function its_getMethod_returns_method_by_name(MethodNode $method) { $method->getName()->willReturn('getName'); $this->addMethod($method); $this->getMethod('getName')->shouldReturn($method); }