/var/www/vhosts/nabawater/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter
Edit: /var/www/vhosts/nabawater/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php (2744B)
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Prints TestDox documentation in HTML format.
*/
class PHPUnit_Util_TestDox_ResultPrinter_HTML extends PHPUnit_Util_TestDox_ResultPrinter
{
/**
* @var string
*/
private $pageHeader = <<
Test Documentation
EOT;
/**
* @var string
*/
private $classHeader = <<%s
EOT;
/**
* @var string
*/
private $classFooter = <<
EOT;
/**
* @var string
*/
private $pageFooter = <<
EOT;
/**
* Handler for 'start run' event.
*/
protected function startRun()
{
$this->write($this->pageHeader);
}
/**
* Handler for 'start class' event.
*
* @param string $name
*/
protected function startClass($name)
{
$this->write(
sprintf(
$this->classHeader,
$name,
$this->currentTestClassPrettified
)
);
}
/**
* Handler for 'on test' event.
*
* @param string $name
* @param bool $success
*/
protected function onTest($name, $success = true)
{
$this->write(
sprintf(
" - %s %s
\n",
$success ? '#555753' : '#ef2929',
$success ? '✓' : '❌',
$name
)
);
}
/**
* Handler for 'end class' event.
*
* @param string $name
*/
protected function endClass($name)
{
$this->write($this->classFooter);
}
/**
* Handler for 'end run' event.
*/
protected function endRun()
{
$this->write($this->pageFooter);
}
}