public function mockery_getMethod($name) { foreach ($this->mockery_getMethods() as $method) { if ($method->getName() == $name) { return $method; } } return null; }