/** * Record any Invocations on the MockObject whilst it's in record mode. * @param Yay_Invocation $invocation */ public function recordInvocation(Yay_Invocation $invocation) { $this->_method = $invocation->getMethod(); $matchers =& $invocation->getArguments(); foreach ($matchers as $matcher) { if ($matcher instanceof Yay_Matcher) { $this->_matchers[] = $matcher; } else { $this->_matchers[] = new Yay_Matchers_IdenticalMatcher($matcher); } } }