예제 #1
0
 public function __call($name, $arguments)
 {
     if (!$this->_wasCalled($name, $arguments)) {
         return $this;
     }
     $calls = $this->_actualCalls();
     $expected = MethodCall::newInstance($name, $arguments)->toString() . ' is never called';
     $this->_fail("Unwanted method was called", $expected, $calls);
 }
예제 #2
0
 public function __call($name, $arguments)
 {
     if ($this->numberOfActualCalls($name, $arguments) === $this->times) {
         return $this;
     }
     $calls = $this->_actualCalls();
     $expected = MethodCall::newInstance($name, $arguments)->toString() . ' is called ' . $this->times . ' times';
     $this->_fail("Called method incorrect times", $expected, $calls);
 }