public function __call($method, $arguments) { switch (strtolower($method)) { case 'equalto': return call_user_func_array(array($this, 'isEqualTo'), $arguments); default: return parent::__call($method, $arguments); } }
public function __call($method, $arguments) { switch (strtolower($method)) { case 'extends': return call_user_func_array(array($this, 'isSubClassOf'), $arguments); case 'implements': return call_user_func_array(array($this, 'hasInterface'), $arguments); default: return parent::__call($method, $arguments); } }
/** * @param string $method * @param array $arguments * * @return $this|mixed */ public function __call($method, $arguments) { switch ($method) { case 'defineMetric': case 'defineLayer': case 'assert': call_user_func_array(array($this->configuration, $method), $arguments); return $this; default: return parent::__call($method, $arguments); } }
public function __call($method, $arguments) { $assertion = null; switch ($method) { case '==': $assertion = 'isEqualTo'; break; case '===': $assertion = 'isIdenticalTo'; break; case '!=': $assertion = 'isNotEqualTo'; break; case '!==': $assertion = 'isNotIdenticalTo'; break; default: return parent::__call($method, $arguments); } return call_user_func_array(array($this, $assertion), $arguments); }
public function __call($method, $arguments) { switch (strtolower($method)) { case 'on': $this->setInstance(array_shift($arguments)); case 'should': return $this->methodIsSet(); case 'return': case 'shouldreturn': return call_user_func_array(array($this, 'returns'), $arguments); case 'throw': case 'shouldthrow': case 'throwexception': case 'shouldthrowexception': return call_user_func_array(array($this, 'throws'), $arguments); default: if ($this->testedMethodName === null) { return $this->setMethod($method)->setArguments($arguments); } } return parent::__call($method, $arguments); }