spec\PhpSpec\CodeGenerator\Generator\ClassGeneratorSpec::it_asks_confirmation_if_class_already_exists PHP Метод

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

public it_asks_confirmation_if_class_already_exists ( $io, $tpl, $fs, PhpSpec\Locator\Resource $resource )
$resource PhpSpec\Locator\Resource
    function it_asks_confirmation_if_class_already_exists($io, $tpl, $fs, Resource $resource)
    {
        $resource->getName()->willReturn('App');
        $resource->getSrcFilename()->willReturn('/project/src/Acme/App.php');
        $resource->getSrcNamespace()->willReturn('Acme');
        $resource->getSrcClassname()->willReturn('Acme\\App');
        $fs->pathExists('/project/src/Acme/App.php')->willReturn(true);
        $io->askConfirmation(Argument::type('string'), false)->willReturn(false);
        $fs->putFileContents(Argument::cetera())->shouldNotBeCalled();
        $this->generate($resource);
    }