Version 1
[yaffs-website] / vendor / drush / drush / tests / Unish / UnishProcessFailedError.php
diff --git a/vendor/drush/drush/tests/Unish/UnishProcessFailedError.php b/vendor/drush/drush/tests/Unish/UnishProcessFailedError.php
new file mode 100644 (file)
index 0000000..765b428
--- /dev/null
@@ -0,0 +1,18 @@
+<?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);
+  }
+}