PhpSpec\Listener\CollaboratorMethodNotFoundListener::afterSuite PHP Method

afterSuite() public method

public afterSuite ( SuiteEvent $event )
$event PhpSpec\Event\SuiteEvent
    public function afterSuite(SuiteEvent $event)
    {
        foreach ($this->interfaces as $interface => $methods) {
            try {
                $resource = $this->resources->createResource($interface);
            } catch (ResourceCreationException $e) {
                continue;
            }
            foreach ($methods as $method => $arguments) {
                if (in_array($method, $this->wrongMethodNames)) {
                    continue;
                }
                if ($this->io->askConfirmation(sprintf(self::PROMPT, $interface, $method))) {
                    $this->generator->generate($resource, 'method-signature', array('name' => $method, 'arguments' => $this->getRealArguments($arguments)));
                    $event->markAsWorthRerunning();
                }
            }
        }
        if ($this->wrongMethodNames) {
            $this->writeErrorMessage();
            $event->markAsNotWorthRerunning();
        }
    }