function it_does_not_prompt_when_collaborator_is_in_spec_namespace(IO $io, ExampleEvent $exampleEvent, SuiteEvent $suiteEvent, CollaboratorNotFoundException $exception) { $exception->getCollaboratorName()->willReturn('spec\\Example\\ExampleClass'); $this->afterExample($exampleEvent); $this->afterSuite($suiteEvent); $io->askConfirmation(Argument::any())->shouldNotHaveBeenCalled(); }
/** * @param CollaboratorNotFoundException $exception * @param ResourceInterface $resource * @return bool */ private function resourceIsInSpecNamespace($exception, $resource) { return strpos($exception->getCollaboratorName(), $resource->getSpecNamespace()) === 0; }