spec\PhpSpec\CodeGenerator\Generator\NewFileNotifyingGeneratorSpec::it_should_not_dispatch_an_event_if_the_file_already_existed PHP Метод

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

public it_should_not_dispatch_an_event_if_the_file_already_existed ( $dispatcher, $filesystem, PhpSpec\Locator\Resource $resource )
$resource PhpSpec\Locator\Resource
    function it_should_not_dispatch_an_event_if_the_file_already_existed($dispatcher, $filesystem, Resource $resource)
    {
        $path = '/foo';
        $resource->getSrcFilename()->willReturn($path);
        $filesystem->pathExists($path)->willReturn(true);
        $this->generate($resource, array());
        $dispatcher->dispatch('afterFileCreation', Argument::any())->shouldNotHaveBeenCalled();
    }