Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / drush / drush / tests / UnishProcessFailedError.php
diff --git a/vendor/drush/drush/tests/UnishProcessFailedError.php b/vendor/drush/drush/tests/UnishProcessFailedError.php
new file mode 100644 (file)
index 0000000..b13200d
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+namespace Unish;
+
+use Symfony\Component\Process\Process;
+
+class UnishProcessFailedError extends \PHPUnit_Framework_AssertionFailedError
+{
+    public function __construct($message, Process $process)
+    {
+        if ($output = $process->getOutput()) {
+            $message .= "\n\nCommand output:\n" . $output;
+        }
+        if ($stderr = $process->getErrorOutput()) {
+            $message .= "\n\nCommand stderr:\n" . $stderr;
+        }
+
+        parent::__construct($message);
+    }
+}