diff --git a/composer.json b/composer.json index 2f6fc97..091e030 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "require-dev": { "phpunit/phpunit" : "^9.5", "friendsofphp/php-cs-fixer": "^3.9", - "phpstan/phpstan": "^1.8" + "phpstan/phpstan": "^1.8", + "infection/infection": "^0.29.5" }, "autoload": { "psr-4": { @@ -50,6 +51,8 @@ "phpunit": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/testingtools/ --no-coverage", "phpunit-line-coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/testingtools/ --coverage-html=reports/phpunit/d3testingtools", - "phpunit-path-coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/testingtools/ --coverage-html=reports/phpunit/d3testingtools --path-coverage" + "phpunit-path-coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/testingtools/ --coverage-html=reports/phpunit/d3testingtools --path-coverage", + + "infection": "./vendor/bin/infection --configuration=vendor/d3/testingtools/infection.json5" } } \ No newline at end of file diff --git a/infection.json5 b/infection.json5 new file mode 100644 index 0000000..c49638f --- /dev/null +++ b/infection.json5 @@ -0,0 +1,35 @@ +{ + "source": { + "directories": [ + "vendor/d3/testingtools" + ], + "excludes": [ + ".php-cs-fixer.php", + "rector.php", + "Tests" + ] + }, + "timeout": 60, + "logs": { + "text": "../../../reports/infection/d3testingtools/infection.log", + "html": "../../../reports/infection/d3testingtools/infection.html", + "summary": "../../../reports/infection/d3testingtools/summary.log", + "json": "../../../reports/infection/d3testingtools/infection-log.json", + "perMutator": "../../../reports/infection/d3testingtools/per-mutator.md", + "summaryJson": "../../../reports/infection/d3testingtools/summary.json" + }, + "tmpDir": "./infection/tmp", + "phpUnit": { + "configDir": "." + }, + "mutators": { + "@default": true, + "@function_signature": false, + "global-ignoreSourceCodeByRegex": [ + ".*\\sstartProfile\\(.*", + ".*\\sstopProfile\\(.*" + ] + }, + "testFramework":"phpunit", + "bootstrap":"source/bootstrap.php" +} \ No newline at end of file