function it_warns_if_a_method_name_is_wrong(ExampleEvent $event, SuiteEvent $suiteEvent, ConsoleIO $io, NameChecker $nameChecker)
{
$exception = new MethodNotFoundException('Error', new DoubleOfInterface(), 'throw');
$event->getException()->willReturn($exception);
$nameChecker->isNameValid('throw')->willReturn(false);
$io->writeBrokenCodeBlock("I cannot generate the method 'throw' for you because it is a reserved keyword", 2)->shouldBeCalled();
$io->askConfirmation(Argument::any())->shouldNotBeCalled();
$this->afterExample($event);
$this->afterSuite($suiteEvent);
}