spec\Prophecy\Doubler\ClassPatch\SplFileInfoPatchSpec::it_should_supply_a_file_for_a_spl_file_object PHP Метод

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

public it_should_supply_a_file_for_a_spl_file_object ( 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_should_supply_a_file_for_a_spl_file_object(ClassNode $node, MethodNode $method)
    {
        $node->hasMethod('__construct')->willReturn(true);
        $node->getMethod('__construct')->willReturn($method);
        $node->getParentClass()->willReturn('SplFileObject');
        $method->setCode(Argument::that(function ($value) {
            return strpos($value, '.php') !== false;
        }))->shouldBeCalled();
        $this->apply($node);
    }