mlively/Phake — Issue #54: example 5.10 Custom Parameter Matchers
Author: isidromerayo
Created: 2012-01-11 09:01:35+00:00
State: open

Hi,
I read and test de nice documentation http://phake.digitalsandwich.com/docs/html/ch05s04.html

I using PHPUnit 3.6.7 and I try to execute example 5.10

PHP Fatal error: Declaration of FiftyTwoCardDeckMatcher::matches() must be compatible with that of Phake_Matchers_IArgumentMatcher::matches() in /home/imerayo/public_html/demo_php_Mocks/tests/MyBestPokerGameTest.php on line 4

I solve this message declare in the method matches using "&"

public function matches(&$argument)
{
return ($argument instanceof CardCollection
&& $argument->getNumberOfCards() == 52);
}

Thanks!
Excuse me my poor english :)