PhpSpec\Formatter\PrettyFormatter::afterSuite PHP Method

afterSuite() public method

public afterSuite ( SuiteEvent $event )
$event PhpSpec\Event\SuiteEvent
    public function afterSuite(SuiteEvent $event)
    {
        $io = $this->getIO();
        $io->writeln();
        foreach (array('failed' => $this->getStatisticsCollector()->getFailedEvents(), 'broken' => $this->getStatisticsCollector()->getBrokenEvents(), 'skipped' => $this->getStatisticsCollector()->getSkippedEvents()) as $status => $events) {
            if (!count($events)) {
                continue;
            }
            $io->writeln(sprintf("<%s>----  %s examples</%s>\n", $status, $status, $status));
            foreach ($events as $failEvent) {
                $io->writeln(sprintf('%s', str_replace('\\', DIRECTORY_SEPARATOR, $failEvent->getSpecification()->getTitle())), 8);
                $this->afterExample($failEvent);
                $io->writeln();
            }
        }
        $io->writeln(sprintf("\n%d specs", $this->getStatisticsCollector()->getTotalSpecs()));
        $counts = array();
        foreach ($this->getStatisticsCollector()->getCountsHash() as $type => $count) {
            if ($count) {
                $counts[] = sprintf('<%s>%d %s</%s>', $type, $count, $type, $type);
            }
        }
        $io->write(sprintf("%d examples ", $this->getStatisticsCollector()->getEventsCount()));
        if (count($counts)) {
            $io->write(sprintf("(%s)", implode(', ', $counts)));
        }
        $io->writeln(sprintf("\n%sms", round($event->getTime() * 1000)));
    }