PHPUnit builds a fresh instance of the test class for every test method, so anything assigned in setUp() is rebuilt each time. That isolation is the point, and…
Chasing one failure through a suite that takes four minutes usually ends with the other tests commented out — and one of them staying commented out, which nobody…
A library that claims 5.3 compatibility is tested against whatever the author has installed, which is one version. The failures that reach users are the ones that version…
$this->load->model(‘order_model’) reads as a convenience and is a service locator: it reaches into a global singleton, constructs whatever it finds, and attaches it to the controller by a…
A query answering in 20 ms locally and timing out on four million rows. An anonymised data subset that keeps the query plan honest, and the mail, cron…
5.3 stops getting security fixes in August. Deprecations first, then the behaviour changes, then the version bump — and an APC replacement that ignores every setting you tuned.
assertEquals compares with ==, which is PHP’s loose comparison — so a method that has quietly started returning the string “0” where it used to return the integer…
Testing code that reads and writes files usually ends in a tests/tmp directory, a setUp that creates it, a tearDown that recursively deletes it, and a suite that…