public function __construct() { parent::__construct(); $firstLevelColorizer = new colorizer('1;36'); $firstLevelPrompt = new prompt('> '); $secondLevelPrompt = new prompt('=> ', $firstLevelColorizer); $thirdLevelPrompt = new prompt('==> ', $firstLevelColorizer); $this->addField(new runner\event\cli()); $resultField = new runner\result\cli(); $resultField->setSuccessColorizer(new colorizer('0;37', '42'))->setFailureColorizer(new colorizer('0;37', '41')); $this->addField($resultField); $failureColorizer = new colorizer('0;31'); $failurePrompt = clone $secondLevelPrompt; $failurePrompt->setColorizer($failureColorizer); $failuresField = new runner\failures\cli(); $failuresField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($firstLevelColorizer)->setMethodPrompt($secondLevelPrompt); $this->addField($failuresField); $outputsField = new runner\outputs\cli(); $outputsField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($firstLevelColorizer)->setMethodPrompt($secondLevelPrompt); $this->addField($outputsField); $errorColorizer = new colorizer('0;33'); $errorMethodPrompt = clone $secondLevelPrompt; $errorMethodPrompt->setColorizer($errorColorizer); $errorPrompt = clone $thirdLevelPrompt; $errorPrompt->setColorizer($errorColorizer); $errorsField = new runner\errors\cli(); $errorsField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($errorColorizer)->setMethodPrompt($errorMethodPrompt)->setErrorPrompt($errorPrompt); $this->addField($errorsField); $exceptionColorizer = new colorizer('0;35'); $exceptionMethodPrompt = clone $secondLevelPrompt; $exceptionMethodPrompt->setColorizer($exceptionColorizer); $exceptionPrompt = clone $thirdLevelPrompt; $exceptionPrompt->setColorizer($exceptionColorizer); $exceptionsField = new runner\exceptions\cli(); $exceptionsField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($exceptionColorizer)->setMethodPrompt($exceptionMethodPrompt)->setExceptionPrompt($exceptionPrompt); $this->addField($exceptionsField); $uncompletedTestColorizer = new colorizer('0;37'); $uncompletedTestMethodPrompt = clone $secondLevelPrompt; $uncompletedTestMethodPrompt->setColorizer($uncompletedTestColorizer); $uncompletedTestOutputPrompt = clone $thirdLevelPrompt; $uncompletedTestOutputPrompt->setColorizer($uncompletedTestColorizer); $uncompletedTestField = new runner\tests\uncompleted\cli(); $uncompletedTestField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($uncompletedTestColorizer)->setMethodPrompt($uncompletedTestMethodPrompt)->setOutputPrompt($uncompletedTestOutputPrompt); $this->addField($uncompletedTestField); $voidTestColorizer = new colorizer('0;34'); $voidTestMethodPrompt = clone $secondLevelPrompt; $voidTestMethodPrompt->setColorizer($voidTestColorizer); $voidTestOutputPrompt = clone $thirdLevelPrompt; $voidTestOutputPrompt->setColorizer($voidTestColorizer); $voidTestField = new runner\tests\void\cli(); $voidTestField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($voidTestColorizer)->setMethodPrompt($voidTestMethodPrompt); $this->addField($voidTestField); $skippedTestColorizer = new colorizer('0;90'); $skippedTestMethodPrompt = clone $secondLevelPrompt; $skippedTestMethodPrompt->setColorizer($skippedTestColorizer); $skippedTestField = new runner\tests\skipped\cli(); $skippedTestField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($skippedTestColorizer)->setMethodPrompt($skippedTestMethodPrompt); $this->addField($skippedTestField); }
public function __construct($showProgress, $showCodeCoverage, $showMissingCodeCoverage, $showDuration, $showMemory, $codeCoverageReportPath, $codeCoverageReportUrl) { parent::__construct(null, null); $this->showProgress = $showProgress; $this->showCodeCoverage = $showCodeCoverage; $this->showMissingCodeCoverage = $showMissingCodeCoverage; $this->showDuration = $showDuration; $this->showMemory = $showMemory; $this->codeCoverageReportPath = $codeCoverageReportPath; $this->codeCoverageReportUrl = $codeCoverageReportUrl; $firstLevelPrompt = new prompt(PHP_EOL); $firstLevelColorizer = new colorizer('1;36'); $secondLevelPrompt = new prompt(' ', $firstLevelColorizer); $failureColorizer = new colorizer('0;31'); $failurePrompt = clone $secondLevelPrompt; $failurePrompt->setColorizer($failureColorizer); $errorColorizer = new colorizer('0;33'); $errorPrompt = clone $secondLevelPrompt; $errorPrompt->setColorizer($errorColorizer); $exceptionColorizer = new colorizer('0;35'); $exceptionPrompt = clone $secondLevelPrompt; $exceptionPrompt->setColorizer($exceptionColorizer); $this->addRunnerField(new runner\atoum\phing($firstLevelPrompt, $firstLevelColorizer), array(atoum\runner::runStart))->addRunnerField(new runner\php\path\cli($firstLevelPrompt, $firstLevelColorizer), array(atoum\runner::runStart))->addRunnerField(new runner\php\version\cli($firstLevelPrompt, $firstLevelColorizer, $secondLevelPrompt), array(atoum\runner::runStart)); if ($this->showCodeCoverage) { $this->addRunnerField(new runner\tests\coverage\phing($firstLevelPrompt, $secondLevelPrompt, new prompt(' ', $firstLevelColorizer), $firstLevelColorizer, null, null, $this->showMissingCodeCoverage), array(atoum\runner::runStop)); } if ($this->showDuration) { $this->addRunnerField(new runner\duration\phing($firstLevelPrompt, $firstLevelColorizer), array(atoum\runner::runStop)); } if ($this->showMemory) { $this->addRunnerField(new runner\tests\memory\phing($firstLevelPrompt, $firstLevelColorizer), array(atoum\runner::runStop)); } $this->addRunnerField(new runner\result\cli($firstLevelPrompt, new colorizer('0;37', '42'), new colorizer('0;37', '41')), array(atoum\runner::runStop))->addRunnerField(new runner\failures\cli($firstLevelPrompt, $failureColorizer, $failurePrompt), array(atoum\runner::runStop))->addRunnerField(new runner\outputs\cli($firstLevelPrompt, $firstLevelColorizer, $secondLevelPrompt), array(atoum\runner::runStop))->addRunnerField(new runner\errors\cli($firstLevelPrompt, $errorColorizer, $errorPrompt), array(atoum\runner::runStop))->addRunnerField(new runner\exceptions\cli($firstLevelPrompt, $exceptionColorizer, $exceptionPrompt), array(atoum\runner::runStop)); if ($this->showProgress) { $this->addTestField(new test\run\phing($firstLevelPrompt, $firstLevelColorizer), array(atoum\test::runStart))->addTestField(new test\event\phing()); if ($this->showDuration) { $this->addTestField(new test\duration\phing($secondLevelPrompt), array(atoum\test::runStop)); } if ($this->showMemory) { $this->addTestField(new test\memory\phing($secondLevelPrompt), array(atoum\test::runStop)); } } if ($this->getCodecoveragereportpath()) { $coverageField = new atoum\report\fields\runner\coverage\html('', $this->getCodecoveragereportpath()); if ($this->codeCoverageReportUrl === null) { $coverageField->setRootUrl("file:////" . realpath($this->getCodecoveragereportpath())); } else { $coverageField->setRootUrl($this->getCodecoveragereporturl()); } $this->addRunnerField($coverageField, array(atoum\runner::runStop)); } }
public function __construct() { parent::__construct(); $defaultColorizer = new colorizer(1); $firstLevelPrompt = new prompt('> ', $defaultColorizer); $secondLevelPrompt = new prompt('=> ', $defaultColorizer); $failureColorizer = new colorizer(31); $failurePrompt = clone $secondLevelPrompt; $failurePrompt->setColorizer($failureColorizer); $testRunField = new bdd\report\fields\spec\run\cli(); $this->addField($testRunField->setPrompt($firstLevelPrompt)->setColorizer($defaultColorizer))->addField(new bdd\report\fields\spec\event\cli())->addField(new bdd\report\fields\spec\event\success())->addField(new bdd\report\fields\spec\event\fails\failure())->addField(new bdd\report\fields\spec\event\fails\exception())->addField(new bdd\report\fields\spec\event\fails\error())->addField(new bdd\report\fields\spec\event\void())->addField(new bdd\report\fields\spec\event\skipped()); $resultField = new bdd\report\fields\runner\result\cli(); $resultField->setSuccessColorizer(new colorizer('1;37;42'))->setFailureColorizer(new colorizer('1;37;41')); $this->addField($resultField); $runnerOutputsField = new runner\outputs\cli(); $runnerOutputsField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($defaultColorizer)->setMethodPrompt($secondLevelPrompt); $this->addField($runnerOutputsField); /*$errorColorizer = new colorizer('0;33'); $errorMethodPrompt = clone $secondLevelPrompt; $errorMethodPrompt->setColorizer($errorColorizer); $errorPrompt = clone $thirdLevelPrompt; $errorPrompt->setColorizer($errorColorizer); $skippedTestColorizer = new colorizer('0;90'); $skippedTestMethodPrompt = clone $secondLevelPrompt; $skippedTestMethodPrompt->setColorizer($skippedTestColorizer); $runnerSkippedField = new runner\tests\skipped\cli(); $runnerSkippedField ->setTitlePrompt($firstLevelPrompt) ->setTitleColorizer($skippedTestColorizer) ->setMethodPrompt($skippedTestMethodPrompt) ; $this->addField($runnerSkippedField);*/ }
public function __construct() { parent::__construct(); $this->addField(new fields\runner\tap\plan())->addField(new fields\test\event\tap()); }
public function __construct() { parent::__construct(); $this->build(); }
public function __construct() { parent::__construct(); $defaultColorizer = new colorizer('1;31'); $firstLevelPrompt = new prompt('> '); $secondLevelPrompt = new prompt('=> ', $defaultColorizer); $thirdLevelPrompt = new prompt('==> ', $defaultColorizer); $phpPathField = new runner\php\path\cli(); $phpPathField->setPrompt($firstLevelPrompt)->setTitleColorizer($defaultColorizer); $this->addField($phpPathField); $phpVersionField = new runner\php\version\cli(); $phpVersionField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($defaultColorizer)->setVersionPrompt($secondLevelPrompt); $this->addField($phpVersionField); $runnerTestsDurationField = new runner\tests\duration\cli(); $runnerTestsDurationField->setPrompt($firstLevelPrompt)->setTitleColorizer($defaultColorizer); $runnerTestsMemoryField = new runner\tests\memory\cli(); $runnerTestsMemoryField->setPrompt($firstLevelPrompt)->setTitleColorizer($defaultColorizer); $this->addField($runnerTestsMemoryField); $runnerTestsCoverageField = new runner\tests\coverage\cli(); $runnerTestsCoverageField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($defaultColorizer)->setClassPrompt($secondLevelPrompt)->setMethodPrompt(new prompt('==> ', $defaultColorizer)); $this->addField($runnerTestsCoverageField); $runnerDurationField = new runner\duration\cli(); $runnerDurationField->setPrompt($firstLevelPrompt)->setTitleColorizer($defaultColorizer); $this->addField($runnerDurationField); $runnerResultField = new runner\result\cli(); $runnerResultField->setSuccessColorizer(new colorizer('0;37', '42'))->setFailureColorizer(new colorizer('0;37', '41')); $this->addField($runnerResultField); $this->addField($runnerTestsDurationField); $this->addField(new runner\event\santa()); $failureColorizer = new colorizer('0;31'); $failurePrompt = clone $secondLevelPrompt; $failurePrompt->setColorizer($failureColorizer); $runnerFailuresField = new runner\failures\cli(); $runnerFailuresField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($failureColorizer)->setMethodPrompt($failurePrompt); $this->addField($runnerFailuresField); $runnerOutputsField = new runner\outputs\cli(); $runnerOutputsField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($defaultColorizer)->setMethodPrompt($secondLevelPrompt); $this->addField($runnerOutputsField); $errorColorizer = new colorizer('0;33'); $errorMethodPrompt = clone $secondLevelPrompt; $errorMethodPrompt->setColorizer($errorColorizer); $errorPrompt = clone $thirdLevelPrompt; $errorPrompt->setColorizer($errorColorizer); $runnerErrorsField = new runner\errors\cli(); $runnerErrorsField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($errorColorizer)->setMethodPrompt($errorMethodPrompt)->setErrorPrompt($errorPrompt); $this->addField($runnerErrorsField); $exceptionColorizer = new colorizer('0;35'); $exceptionMethodPrompt = clone $secondLevelPrompt; $exceptionMethodPrompt->setColorizer($exceptionColorizer); $exceptionPrompt = clone $thirdLevelPrompt; $exceptionPrompt->setColorizer($exceptionColorizer); $runnerExceptionsField = new runner\exceptions\cli(); $runnerExceptionsField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($exceptionColorizer)->setMethodPrompt($exceptionMethodPrompt)->setExceptionPrompt($exceptionPrompt); $this->addField($runnerExceptionsField); $uncompletedTestColorizer = new colorizer('0;37'); $uncompletedTestMethodPrompt = clone $secondLevelPrompt; $uncompletedTestMethodPrompt->setColorizer($uncompletedTestColorizer); $uncompletedTestOutputPrompt = clone $thirdLevelPrompt; $uncompletedTestOutputPrompt->setColorizer($uncompletedTestColorizer); $runnerUncompletedField = new runner\tests\uncompleted\cli(); $runnerUncompletedField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($uncompletedTestColorizer)->setMethodPrompt($uncompletedTestMethodPrompt)->setOutputPrompt($uncompletedTestOutputPrompt); $this->addField($runnerUncompletedField); $voidTestColorizer = new colorizer('0;34'); $voidTestMethodPrompt = clone $secondLevelPrompt; $voidTestMethodPrompt->setColorizer($voidTestColorizer); $runnerVoidField = new runner\tests\void\cli(); $runnerVoidField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($voidTestColorizer)->setMethodPrompt($voidTestMethodPrompt); $this->addField($runnerVoidField); $skippedTestColorizer = new colorizer('0;90'); $skippedTestMethodPrompt = clone $secondLevelPrompt; $skippedTestMethodPrompt->setColorizer($skippedTestColorizer); $runnerSkippedField = new runner\tests\skipped\cli(); $runnerSkippedField->setTitlePrompt($firstLevelPrompt)->setTitleColorizer($skippedTestColorizer)->setMethodPrompt($skippedTestMethodPrompt); $this->addField($runnerSkippedField); }