spec\Prophecy\Doubler\ClassPatch\SplFileInfoPatchSpec::it_updates_existing_method_if_found PHP Method

it_updates_existing_method_if_found() public method

public it_updates_existing_method_if_found ( Prophecy\Doubler\Generator\Node\ClassNode $node, Prophecy\Doubler\Generator\Node\MethodNode $method )
$node Prophecy\Doubler\Generator\Node\ClassNode
$method Prophecy\Doubler\Generator\Node\MethodNode
    function it_updates_existing_method_if_found(ClassNode $node, MethodNode $method)
    {
        $node->hasMethod('__construct')->willReturn(true);
        $node->getMethod('__construct')->willReturn($method);
        $node->getParentClass()->shouldBeCalled();
        $method->useParentCode()->shouldBeCalled();
        $this->apply($node);
    }