Use a custom services file for your tests, to allow changing dependencies as needed.
Dec 18, 2020
Our code base has a lot of code that looks like this: <?php try { $this->doScaryThing(); } catch(Exception $e) { trigger_error("Downgraded: " . get_class($e) . ":" . $e->getMessage(), E_USER_WARNING); }
Nov 21, 2019
I wrote about infection a while ago, and not too long after that, 0.9.0 was released. Lets look at the new features, and how we can use them in our projects!
Jul 25, 2018
Sometimes a code base has specific code style rules, that aren’t easy to detect with either with a style fixer or a static analyzer. So instead of having to tell every new contributor your rules during a PR, or lay them all out in your CONTRIBUTING.md, why not automatically check them with PHPUnit. We will look at a couple of different ‘rules’ your code base could have, and how to set up the automated tests.
Jun 28, 2018
Are your tests testing? Are you assertions asserting? Let’s find out how we can test that our tests are testing, with the mutation testing framework: infection.
Jun 10, 2018