add infection library

This commit is contained in:
Daniel Seifert 2024-06-16 23:28:15 +02:00
parent f419368b33
commit 97ccbb0074
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
2 changed files with 40 additions and 2 deletions

View File

@ -30,7 +30,8 @@
"require-dev": { "require-dev": {
"phpunit/phpunit" : "^9.5", "phpunit/phpunit" : "^9.5",
"friendsofphp/php-cs-fixer": "^3.9", "friendsofphp/php-cs-fixer": "^3.9",
"phpstan/phpstan": "^1.8" "phpstan/phpstan": "^1.8",
"infection/infection": "^0.29.5"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -50,6 +51,8 @@
"phpunit": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --config=vendor/d3/testingtools/ --no-coverage", "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-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"
} }
} }

35
infection.json5 Normal file
View File

@ -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"
}