/**
  * {@inheritdoc}
  */
 public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
 {
     if ($this->debug) {
         return parent::startTestSuite($suite);
     }
     if ($this->numTests == -1) {
         parent::startTestSuite($suite);
         $this->scoreboard->start();
     }
 }
예제 #2
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use NyanCat\Cat;
use NyanCat\Rainbow;
use NyanCat\Team;
use NyanCat\Scoreboard;
use Fab\Factory as FabFactory;
$scoreboard = new Scoreboard(new Cat(array(array('              ___  ', '             / %_) ', '     _.----./ /    ', '    /        /     ', ' __/ (  | (  |     ', "/__.-'|_|--|_|     "), array('               ___ ', '              / %_)', '     _.----._/ /   ', '    /         /    ', ' __/ (  | (  |     ', "/__.-|_|--|_|      "), array('              ___  ', '             / %_) ', '    _.----._/ /    ', '   /         /     ', ' _/ (  / /  /      ', "/_/-|_/--|_/       "))), new Rainbow(FabFactory::getFab(empty($_SERVER['TERM']) ? 'unknown' : $_SERVER['TERM'])), array(new Team('pass', 'green', '^'), new Team('fail', 'red', 'o'), new Team('pending', 'cyan', '-')));
$scoreboard->start();
for ($i = 0; $i < 100; $i++) {
    usleep(90000);
    $scoreboard->score('pass');
}
$scoreboard->stop();