상속: extends mageekguy\atoum\report\fields\runner\event
예제 #1
0
파일: santa.php 프로젝트: atoum/atoum
 public function __construct(progressBar $progressBar = null)
 {
     parent::__construct($progressBar);
     $this->snowColorizer = new colorizer(38);
     $red = new colorizer(31);
     $black = new colorizer('1;30');
     $brown = new colorizer('38;5;94');
     $this->sprite = array('            _            ', '           {_}           ', $red->colorize('           / \\           '), $red->colorize('          /   \\          '), $red->colorize('         /_____\\         '), '       {`_______`}    ', '        // . . \\\\        ', '       (/(__7__)\\)       ', '       |\'-` = `-\'|       ', '       |         |   ', $red->colorize('       /') . '\\       /' . $red->colorize('\\       '), $red->colorize('      /  ') . '\'.   .\'' . $red->colorize('  \\      '), $red->colorize('     /_/') . '   `"`   ' . $red->colorize('\\_\\     '), '    {__}' . $brown->colorize('###') . $black->colorize('[_]') . $brown->colorize('###') . '{__}    ', '    (_/' . $red->colorize('\\_________/') . '\\_)	', $red->colorize('        |___|___|        '), $red->colorize('         |--|--|         '), $brown->colorize('        (__)') . '`' . $brown->colorize('(__)        '));
 }
예제 #2
0
파일: cli.php 프로젝트: xihewang/atoum
 public function test__toString()
 {
     $this->if($testMethodNumber = rand(5, PHP_INT_MAX))->and($runnerController = new atoum\mock\controller())->and($runnerController->__construct = function () {
     })->and($runnerController->getTestMethodNumber = function () use($testMethodNumber) {
         return $testMethodNumber;
     })->and($runner = new \mock\mageekguy\atoum\runner())->and($field = new runner\event\cli())->and($progressBar = new atoum\cli\progressBar($runner->getTestMethodNumber()))->then->castToString($field)->isEmpty()->if($field->handleEvent(atoum\runner::runStart, $runner))->then->castToString($field)->isEqualTo((string) $progressBar)->if($field->handleEvent(atoum\test::beforeSetUp, $this))->then->castToString($field)->isEqualTo((string) $progressBar)->if($field->handleEvent(atoum\test::afterSetUp, $this))->then->castToString($field)->isEqualTo((string) $progressBar)->if($field->handleEvent(atoum\test::beforeTestMethod, $this))->then->castToString($field)->isEqualTo((string) $progressBar)->if($field->handleEvent(atoum\test::fail, $this))->then->castToString($field)->isEqualTo((string) $progressBar->refresh('F'))->if($field->handleEvent(atoum\test::error, $this))->then->castToString($field)->isEqualTo((string) $progressBar->refresh('E'))->if($field->handleEvent(atoum\test::exception, $this))->then->castToString($field)->isEqualTo((string) $progressBar->refresh('X'))->if($field->handleEvent(atoum\test::success, $this))->then->castToString($field)->isEqualTo((string) $progressBar->refresh('S'))->if($field->handleEvent(atoum\test::uncompleted, $this))->then->castToString($field)->isEqualTo((string) $progressBar->refresh('U'))->if($field->handleEvent(atoum\test::void, $this))->then->castToString($field)->isEqualTo((string) $progressBar->refresh('0'))->if($field->handleEvent(atoum\test::skipped, $this))->then->castToString($field)->isEqualTo((string) $progressBar->refresh('-'))->if($field->handleEvent(atoum\test::afterTestMethod, $this))->then->castToString($field)->isEqualTo((string) $progressBar)->if($field->handleEvent(atoum\test::beforeTearDown, $this))->then->castToString($field)->isEqualTo((string) $progressBar)->if($field->handleEvent(atoum\test::afterTearDown, $this))->then->castToString($field)->isEqualTo((string) $progressBar)->if($field->handleEvent(atoum\test::runStop, $this))->then->castToString($field)->isEqualTo((string) $progressBar)->if($field->handleEvent(atoum\runner::runStop, $runner))->then->castToString($field)->isEqualTo(PHP_EOL);
 }
예제 #3
0
파일: nyancat.php 프로젝트: atoum/atoum
 public function __construct(progressBar $progressBar = null)
 {
     parent::__construct($progressBar);
     $this->catColorizer = new colorizer(32);
     $this->rainbowColorizers = array(new colorizer(31), new colorizer(32), new colorizer(33), new colorizer(34), new colorizer(35), new colorizer(36));
 }