This project accompanies the conference "Uncover hidden vulnerabilities: Master your PHP tests with PHPInfection & Pest" , presented by Vincent Amstoutz.
The goal of this talk is to show how mutation testing can enhance the robustness of PHP testing, using tools such as PHP Infection and Pest.
Important
The commands described below require the use of Castor! Make sure Castor is installed and configured on your machine.
To install the project dependencies, use the following command:
castor install
With PHPUnit
XDEBUG_MODE=coverage php bin/phpunit --testsuite=Phpunit
With Pest
XDEBUG_MODE=coverage vendor/bin/pest --testsuite=Pest
With PHP Infection (which uses PHPUnit)
XDEBUG_MODE=coverage tools/infection/vendor/bin/infection
With Pest
XDEBUG_MODE=coverage php vendor/bin/pest --testsuite=Pest --mutate
castor lint
Note
This project is intended for demonstration and learning purposes. For production implementation, please consult the documentation for each tool and adapt the configuration according to your needs.
This project is under the MIT license. See the LICENSE file for details.