HtmlOutputPrinter.php 695 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Drupal\Tests\Listeners\Legacy;
  3. use Drupal\Tests\Listeners\HtmlOutputPrinterTrait;
  4. /**
  5. * Defines a class for providing html output results for functional tests.
  6. *
  7. * @internal
  8. */
  9. class HtmlOutputPrinter extends \PHPUnit_TextUI_ResultPrinter {
  10. use HtmlOutputPrinterTrait;
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function __construct($out, $verbose, $colors, $debug, $numberOfColumns) {
  15. parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns);
  16. $this->setUpHtmlOutput();
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function printResult(\PHPUnit_Framework_TestResult $result) {
  22. parent::printResult($result);
  23. $this->printHtmlOutput();
  24. }
  25. }