8889841chome/clixcotz/mars.clix.co.tz/vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php000066600000006511150533765150026241 0ustar00 * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Util\TestDox; use function sprintf; use PHPUnit\Framework\TestResult; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class HtmlResultPrinter extends ResultPrinter { /** * @var string */ private const PAGE_HEADER = <<<'EOT' Test Documentation EOT; /** * @var string */ private const CLASS_HEADER = <<<'EOT'

%s

EOT; /** * @var string */ private const PAGE_FOOTER = <<<'EOT' EOT; public function printResult(TestResult $result): void { } /** * Handler for 'start run' event. */ protected function startRun(): void { $this->write(self::PAGE_HEADER); } /** * Handler for 'start class' event. */ protected function startClass(string $name): void { $this->write( sprintf( self::CLASS_HEADER, $this->currentTestClassPrettified ) ); } /** * Handler for 'on test' event. */ protected function onTest(string $name, bool $success = true): void { $this->write( sprintf( "
  • %s
  • \n", $success ? 'success' : 'defect', $name ) ); } /** * Handler for 'end class' event. */ protected function endClass(string $name): void { $this->write(self::CLASS_FOOTER); } /** * Handler for 'end run' event. */ protected function endRun(): void { $this->write(self::PAGE_FOOTER); } }