spec\PhpSpec\CodeGenerator\Generator\NewFileNotifyingGeneratorSpec::it_should_check_that_the_file_was_created PHP Method

it_should_check_that_the_file_was_created() public method

public it_should_check_that_the_file_was_created ( $generator, $filesystem, PhpSpec\Locator\Resource $resource )
$resource PhpSpec\Locator\Resource
    function it_should_check_that_the_file_was_created($generator, $filesystem, Resource $resource)
    {
        $path = '/foo';
        $resource->getSrcFilename()->willReturn($path);
        $filesystem->pathExists($path)->willReturn(false);
        $generator->supports(Argument::cetera())->willReturn(false);
        $generator->generate($resource, array())->will(function () use($filesystem, $path) {
            $filesystem->pathExists($path)->willReturn(true);
        });
        $this->generate($resource, array());
    }