/** * {@inheritdoc} */ protected function printSummary(LoggerDataCollector $logger) { $results = $logger->getScenariosStatuses(); $result = $results['failed'] > 0 ? 'failed' : 'passed'; $this->writeln('<div class="summary ' . $result . '">'); $this->writeln('<div class="counters">'); parent::printSummary($logger); $this->writeln('</div>'); $this->writeln(<<<'HTML' <div class="switchers"> <a href="javascript:void(0)" id="behat_show_all">[+] all</a> <a href="javascript:void(0)" id="behat_hide_all">[-] all</a> </div> HTML ); $this->writeln('</div>'); }
/** * Prints scenarios summary information. * * @param Behat\Behat\DataCollector\LoggerDataCollector $logger suite logger */ protected function printScenariosSummary(LoggerDataCollector $logger) { $count = $logger->getScenariosCount(); $header = $this->translateChoice('{0} No scenarios|{1} 1 scenario|]1,Inf] %1% scenarios', $count, array('%1%' => $count)); $this->write($header); $this->printStatusesSummary($logger->getScenariosStatuses()); }