spec\PhpSpec\Formatter\DotFormatterSpec::it_outputs_a_suite_summary PHP Метод

it_outputs_a_suite_summary() публичный Метод

public it_outputs_a_suite_summary ( SuiteEvent $event, ConsoleIO $io, PhpSpec\Listener\StatisticsCollector $stats )
$event PhpSpec\Event\SuiteEvent
$io PhpSpec\Console\ConsoleIO
$stats PhpSpec\Listener\StatisticsCollector
    function it_outputs_a_suite_summary(SuiteEvent $event, ConsoleIO $io, StatisticsCollector $stats)
    {
        $stats->getEventsCount()->willReturn(1);
        $stats->getFailedEvents()->willReturn(array());
        $stats->getBrokenEvents()->willReturn(array());
        $stats->getPendingEvents()->willReturn(array());
        $stats->getSkippedEvents()->willReturn(array());
        $stats->getTotalSpecs()->willReturn(15);
        $event->getTime()->willReturn(12.345);
        $stats->getCountsHash()->willReturn(array('passed' => 1, 'pending' => 0, 'skipped' => 0, 'failed' => 2, 'broken' => 0));
        $this->afterSuite($event);
        $io->writeln('15 specs')->shouldHaveBeenCalled();
        $io->writeln("\n12345ms")->shouldHaveBeenCalled();
        $io->write('1 example ')->shouldHaveBeenCalled();
        $expected = '(<passed>1 passed</passed>, <failed>2 failed</failed>)';
        $io->write($expected)->shouldHaveBeenCalled();
    }