PHPUnit Assertion Usage¶
This pass checks the usage of assertions in unit tests, and will suggest more specific assertions if available:
// instead of
$this->assertTrue(count($foo) > 0);
// it would suggest to use
$this->assertGreaterThan(0, $foo);
The reasoning behind this is that more specific assertions will lead to better error messages if the assertion fails, which in turn saves you debugging time.