PhpSpec\NyanFormattersExtension\Formatter\NyanFormatter::afterSuite PHP Method

afterSuite() public method

Actions to perform after the test suite
public afterSuite ( SuiteEvent $event )
$event PhpSpec\Event\SuiteEvent
    public function afterSuite(SuiteEvent $event)
    {
        $io = $this->getIO();
        if (!$io->isDecorated()) {
            return parent::afterSuite($event);
        }
        $this->scoreboard->stop();
        $io->writeln();
        $stats = $this->getStatisticsCollector();
        foreach (array('failed' => $stats->getFailedEvents(), 'broken' => $stats->getBrokenEvents(), 'pending' => $stats->getPendingEvents()) as $events) {
            if (!count($events)) {
                continue;
            }
            foreach ($events as $failEvent) {
                $this->printException($failEvent);
            }
        }
        $counts = array();
        foreach ($stats->getCountsHash() as $type => $count) {
            if ($count) {
                $counts[] = sprintf('<%s>%d %s</%s>', $type, $count, $type, $type);
            }
        }
        $count = $stats->getEventsCount();
        $plural = $count !== 1 ? 's' : '';
        $io->write(sprintf("%d example%s ", $count, $plural));
        if (count($counts)) {
            $io->write(sprintf("(%s)", implode(', ', $counts)));
        }
        $io->writeln(sprintf("\n%sms", round($event->getTime() * 1000)));
    }