/** * (non-PHPdoc) * @see mock/LimeMockStateInterface#invoke($method, $parameters) */ public function invoke(LimeMockMethod $method, array $parameters = null) { $invocation = new LimeMockInvocation($method, is_null($parameters) ? array() : $parameters); $invocation = new LimeMockInvocationExpectation($invocation, $this->output); if (is_null($parameters)) { $invocation->withAnyParameters(); } else { $invocation->withParameters($parameters); } $this->behaviour->expect($invocation); return $invocation; }
/** * (non-PHPdoc) * @see mock/LimeMockBehaviourInterface#expect($invocation) */ public function expect(LimeMockInvocationExpectation $invocation) { $this->invocations[] = $invocation; if ($this->options['strict']) { $invocation->strict(); } if ($this->options['nice']) { $invocation->any(); } else { $invocation->once(); } }