spec\PhpSpec\Listener\MethodNotFoundListenerSpec::it_prompts_and_warns_when_one_method_name_is_correct_but_other_reserved PHP 메소드

it_prompts_and_warns_when_one_method_name_is_correct_but_other_reserved() 공개 메소드

public it_prompts_and_warns_when_one_method_name_is_correct_but_other_reserved ( $exampleEvent, SuiteEvent $suiteEvent, ConsoleIO $io, PhpSpec\Util\NameChecker $nameChecker )
$suiteEvent PhpSpec\Event\SuiteEvent
$io PhpSpec\Console\ConsoleIO
$nameChecker PhpSpec\Util\NameChecker
    function it_prompts_and_warns_when_one_method_name_is_correct_but_other_reserved($exampleEvent, SuiteEvent $suiteEvent, ConsoleIO $io, NameChecker $nameChecker)
    {
        $this->callAfterExample($exampleEvent, $nameChecker, 'throw', false);
        $this->callAfterExample($exampleEvent, $nameChecker, 'foo');
        $io->writeBrokenCodeBlock("I cannot generate the method 'throw' for you because it is a reserved keyword", 2)->shouldBeCalled();
        $io->askConfirmation('Do you want me to create `stdClass::foo()` for you?')->shouldBeCalled();
        $suiteEvent->markAsNotWorthRerunning()->shouldBeCalled();
        $this->afterSuite($suiteEvent);
    }