Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / Tests / Listeners / Legacy / HtmlOutputPrinter.php
diff --git a/web/core/tests/Drupal/Tests/Listeners/Legacy/HtmlOutputPrinter.php b/web/core/tests/Drupal/Tests/Listeners/Legacy/HtmlOutputPrinter.php
new file mode 100644 (file)
index 0000000..7c1f45e
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+
+namespace Drupal\Tests\Listeners\Legacy;
+
+use Drupal\Tests\Listeners\HtmlOutputPrinterTrait;
+
+/**
+ * Defines a class for providing html output results for functional tests.
+ *
+ * @internal
+ */
+class HtmlOutputPrinter extends \PHPUnit_TextUI_ResultPrinter {
+  use HtmlOutputPrinterTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct($out, $verbose, $colors, $debug, $numberOfColumns) {
+    parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns);
+
+    $this->setUpHtmlOutput();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function printResult(\PHPUnit_Framework_TestResult $result) {
+    parent::printResult($result);
+
+    $this->printHtmlOutput();
+  }
+
+}