spec\PhpSpec\CodeGenerator\Generator\SpecificationGeneratorSpec::it_asks_confirmation_if_spec_already_exists PHP Метод

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

public it_asks_confirmation_if_spec_already_exists ( $io, $tpl, $fs, PhpSpec\Locator\Resource $resource )
$resource PhpSpec\Locator\Resource
    function it_asks_confirmation_if_spec_already_exists($io, $tpl, $fs, Resource $resource)
    {
        $resource->getSpecName()->willReturn('AppSpec');
        $resource->getSpecFilename()->willReturn('/project/spec/Acme/AppSpec.php');
        $resource->getSpecNamespace()->willReturn('spec\\Acme');
        $resource->getSrcClassname()->willReturn('Acme\\App');
        $fs->pathExists('/project/spec/Acme/AppSpec.php')->willReturn(true);
        $io->askConfirmation(Argument::type('string'), false)->willReturn(false);
        $fs->putFileContents(Argument::cetera())->shouldNotBeCalled();
        $this->generate($resource);
    }