3 * This file is part of PHPUnit.
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
12 * Prints TestDox documentation in HTML format.
14 * @since Class available since Release 2.1.0
16 class PHPUnit_Util_TestDox_ResultPrinter_HTML extends PHPUnit_Util_TestDox_ResultPrinter
21 protected $printsHTML = true;
24 * Handler for 'start run' event.
26 protected function startRun()
28 $this->write('<html><body>');
32 * Handler for 'start class' event.
36 protected function startClass($name)
39 '<h2 id="' . $name . '">' . $this->currentTestClassPrettified .
45 * Handler for 'on test' event.
48 * @param bool $success
50 protected function onTest($name, $success = true)
53 $strikeOpen = '<span style="text-decoration:line-through;">';
54 $strikeClose = '</span>';
60 $this->write('<li>' . $strikeOpen . $name . $strikeClose . '</li>');
64 * Handler for 'end class' event.
68 protected function endClass($name)
70 $this->write('</ul>');
74 * Handler for 'end run' event.
76 protected function endRun()
78 $this->write('</body></html>');