spec\Prophecy\Doubler\ClassPatch\KeywordPatchSpec::it_will_remove_echo_and_eval_methods PHP Метод

it_will_remove_echo_and_eval_methods() публичный Метод

public it_will_remove_echo_and_eval_methods ( Prophecy\Doubler\Generator\Node\ClassNode $node, Prophecy\Doubler\Generator\Node\MethodNode $method1, Prophecy\Doubler\Generator\Node\MethodNode $method2, Prophecy\Doubler\Generator\Node\MethodNode $method3 )
$node Prophecy\Doubler\Generator\Node\ClassNode
$method1 Prophecy\Doubler\Generator\Node\MethodNode
$method2 Prophecy\Doubler\Generator\Node\MethodNode
$method3 Prophecy\Doubler\Generator\Node\MethodNode
    function it_will_remove_echo_and_eval_methods(ClassNode $node, MethodNode $method1, MethodNode $method2, MethodNode $method3)
    {
        $node->removeMethod('eval')->shouldBeCalled();
        $node->removeMethod('echo')->shouldBeCalled();
        $method1->getName()->willReturn('echo');
        $method2->getName()->willReturn('eval');
        $method3->getName()->willReturn('notKeyword');
        $node->getMethods()->willReturn(array('echo' => $method1, 'eval' => $method2, 'notKeyword' => $method3));
        $this->apply($node);
    }