Skip to content

Commit

Permalink
Upgrade to Infection 0.16 (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored May 15, 2020
1 parent 2dc7ec1 commit 8e83109
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
COVERS_VALIDATOR=php -d zend.enable_gc=0 vendor-bin/covers-validator/bin/covers-validator
HUMBUG=phpdbg -qrr vendor-bin/humbug/bin/humbug --options="--exclude-group=integration"
INFECTION=vendor-bin/infection/bin/infection --test-framework-options="--exclude-group=integration"
PHPDBG=phpdbg -qrr -d zend.enable_gc=0 bin/phpunit
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/php-cs-fixer/bin/php-cs-fixer
PHPSTAN=php -d zend.enable_gc=0 -dmemory_limit=1G vendor-bin/phpstan/bin/phpstan
Expand Down Expand Up @@ -36,8 +36,8 @@ tc: vendor/phpunit
$(PHPDBG) --exclude-group=integration --coverage-text --coverage-html=dist/coverage --coverage-clover=dist/clover.xml

tm: ## Run the tests for mutation testing
tm: vendor/phpunit vendor-bin/humbug/vendor
$(HUMBUG)
tm: vendor/phpunit vendor-bin/infection/vendor
$(INFECTION)

tp: ## Run Blackfire performance tests
tp: vendor vendor-bin/profiling/vendor
Expand Down Expand Up @@ -104,11 +104,11 @@ vendor-bin/profiling/vendor: vendor-bin/profiling/composer.lock
vendor-bin/profiling/composer.lock: vendor-bin/profiling/composer.json
@echo profiling composer.lock is not up to date

vendor-bin/humbug/vendor: vendor-bin/humbug/composer.lock
composer bin humbug install
vendor-bin/infection/vendor: vendor-bin/infection/composer.lock
composer bin infection install

vendor-bin/humbug/composer.lock: vendor-bin/humbug/composer.json
@echo humbug composer.lock is not up to date
vendor-bin/infection/composer.lock: vendor-bin/infection/composer.json
@echo infection composer.lock is not up to date

vendor-bin/covers-validator/vendor: vendor-bin/covers-validator/composer.lock
composer bin covers-validator install
Expand Down
6 changes: 5 additions & 1 deletion humbug.json.dist → infection.json.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "./vendor-bin/infection/vendor/infection/infection/resources/schema.json",
"source": {
"directories": [
"src"
Expand All @@ -14,8 +15,11 @@
"vendor"
]
},
"phpUnit": {
"customPath": "./bin/phpunit"
},
"timeout": 10,
"logs": {
"text": "dist/humbuglog.txt"
"text": "dist/infection.txt"
}
}
3 changes: 2 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
-->

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.4/phpunit.xsd"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
enforceTimeLimit="true"
beStrictAboutTestsThatDoNotTestAnything="false"
executionOrder="random"
>

<php>
Expand Down
4 changes: 2 additions & 2 deletions phpunit_symfony.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
-->

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.4/phpunit.xsd"
backupGlobals="false"
xsi:noNamespaceSchemaLocation="./vendor-bin/symfony/vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor-bin/symfony/vendor/autoload.php"
colors="true"
beStrictAboutTestsThatDoNotTestAnything="false"
enforceTimeLimit="true"
executionOrder="random"
>

<php>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public function testIsNotClonable()
public function testCannotAcceptInvalidMethodHandlers()
{
$this->expectException(\TypeError::class);
$this->expectExceptionMessageMatches('/must be an instance of Nelmio\\\\Alice\\\\FixtureBuilder\\\\Denormalizer\\\\Fixture\\\\SpecificationBagDenormalizer\\\\Calls\\\\MethodFlagHandler, instance of stdClass given/');

new CallsWithFlagsDenormalizer(
new FakeCallsDenormalizer(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"humbug/humbug": "^1.0@rc",
"infection/infection": "^0.16",
"theofidry/composer-inheritance-plugin": "^1.0"
},
"config": {
Expand Down

0 comments on commit 8e83109

Please sign in to comment.