From f19313e359fe41548fc6dce4f526899877faeb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Karlovi=C4=87?= Date: Fri, 21 Apr 2023 09:50:16 +0200 Subject: [PATCH] feat: more precise Infection, only covering test cases (#128) --- resources/PHP/common.mk | 2 +- tests/functional/PHP/PhpTrait.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/PHP/common.mk b/resources/PHP/common.mk index aff5b3b..432a5de 100644 --- a/resources/PHP/common.mk +++ b/resources/PHP/common.mk @@ -63,7 +63,7 @@ test/phpunit-coverage: | ${HOME}/.composer var/phpqa composer.lock $(call block_end) test/infection: test/phpunit-coverage $(call block_start,$@) - ${PHPQA_DOCKER_COMMAND} infection run --verbose --show-mutations --no-interaction --only-covered --coverage var/phpqa/phpunit/ --threads max + ${PHPQA_DOCKER_COMMAND} infection run --verbose --show-mutations --no-interaction --only-covered --only-covering-test-cases --coverage var/phpqa/phpunit/ --threads max $(call block_end) ${HOME}/.composer: diff --git a/tests/functional/PHP/PhpTrait.php b/tests/functional/PHP/PhpTrait.php index 5646327..1c3144f 100644 --- a/tests/functional/PHP/PhpTrait.php +++ b/tests/functional/PHP/PhpTrait.php @@ -126,7 +126,7 @@ private function paths(?array $env): array 'test: unit' => [ $this->generatePhpqaExecutionPath('php -d pcov.enabled=1 vendor/bin/phpunit --verbose --coverage-text --log-junit=var/phpqa/phpunit/junit.xml --coverage-xml var/phpqa/phpunit/coverage-xml/', phpVersion: $phpVersion, dockerImage: $phpqaDockerImage), - $this->generatePhpqaExecutionPath('infection run --verbose --show-mutations --no-interaction --only-covered --coverage var/phpqa/phpunit/ --threads max', phpVersion: $phpVersion, dockerImage: $phpqaDockerImage), + $this->generatePhpqaExecutionPath('infection run --verbose --show-mutations --no-interaction --only-covered --only-covering-test-cases --coverage var/phpqa/phpunit/ --threads max', phpVersion: $phpVersion, dockerImage: $phpqaDockerImage), ], 'test: functional app' => [ $this->generateDockerComposeAppExecExecutionPath('vendor/bin/behat --colors --strict', 'test'),