protected function checkMethod($method)
{
if ($this->mockClass !== null && $this->disableMethodChecking === false && in_array(strtolower($method), $this->mockMethods) === false) {
if (in_array('__call', $this->mockMethods) === false) {
throw new exceptions\logic('Method \'' . $this->getMockClass() . '::' . $method . '()\' does not exist');
}
if (isset($this->__call) === false) {
$controller = $this;
parent::__set('__call', function ($method, $arguments) use($controller) {
return $controller->invoke($method, $arguments);
});
}
}
return $this;
}