If you do not use PHPUnit, Phake also supports Hamcrest matchers. This is in-line with the Phake's design goal of being usable with any testing framework. Here is a repeat of the PHPUnit example, this time using SimpleTest and Hamcrest matchers. (Please note I will probably add support for simple test directly at a later date.)
Example 5.5. Using Hamcrest Matchers
<?php class TestHamcrestMatcher extends UnitTestCase { public function testDealNumberOfCards() { $deck = Phake::mock('CardCollection'); $players = Phake::mock('PlayerCollection'); $dealer = Phake::mock('DealerStrategy'); $dealer->deal($deck, $players, 11); Phake::verify($dealer)->deal($deck, $players, greaterThan(10)); } } ?>