Skip to content

Infection

Infection is a tool which runs your PHPUnit tests, and mutates values - such as flipping booleans from false to true, or switching > operators to >=.

Running Infection

bin/qa -t infection

Configuring Infection

Infection is configured using an infection.json file, which is provided by, and used by PHPQA. The default configuration is stored in PHPQA's configDefaults folder

It's worth noting that PHPQA's infection.json uses the phpunit.xml in configDefaults. If you're using your own phpunit.xml in qaConfig, you'll need to do the same for infection.json.