A provider that builds its cases from something created in setUp() fails with a null, because every provider in the class runs before any test does — including…
Test code is usually excluded from static analysis on the grounds that it is not production code, which is where a good proportion of the useful findings are…
Mocking a third-party class binds the test to that class’s current signature, so an upgrade changing a method leaves the test passing against a shape that no longer…
PHPUnit takes the expected value first and the actual second, and getting them the wrong way round produces a test that passes and fails identically — but reports…
Deploying by rsync on a Friday afternoon, and what replaced it: lint, test, build, stage, promote — with a rollback that is the same mechanism rather than a…
The @expectedException annotation and setExpectedException() are both deprecated in favour of methods, which is more than a rename — the annotation asserted only that the exception was thrown…
Testing the same behaviour across several inputs usually produces six near-identical methods, and when the assertion needs changing it has to change six times. A data provider separates…