testphp for quality code

testphp is a PHP unit-testing framework that catches more issues, and with simpler tests

testphp catches more issues

testphp catches more issues because it catches everything.

Every test is run in an isolated process, starting from a controlled state. At the end of the test, all state changes are recorded and compared against the expected results.

That means testphp will catch everything—a PHP notice, an unexpected “echo” statement, a new global variable, a method called in the wrong order—even if you didn’t explicitly check for each of those things. That completeness gives you a peace of mind that you can’t get any other way.

testphp is simpler

Here’s an example of a test case:

TestCase.php
<?php

// Test
$x = 1 + 1;

// Output
$x = 2;

Ah, simplicity!

The testphp framework is an invisible framework: you’ll never see it anywhere in your tests. That means there is very little “friction” when you’re writing unit tests, and there is almost no learning curve. What could be nicer than that?