UnishProcessFailedError.php

  1. 8.0.x tests/Unish/UnishProcessFailedError.php
  2. 7.x tests/Unish/UnishProcessFailedError.php
  3. master tests/Unish/UnishProcessFailedError.php

Namespace

Unish

Classes

File

tests/Unish/UnishProcessFailedError.php
View source
  1. <?php
  2. namespace Unish;
  3. use Symfony\Component\Process\Process;
  4. class UnishProcessFailedError extends \PHPUnit_Framework_AssertionFailedError {
  5. public function __construct($message, Process $process) {
  6. if ($output = $process->getOutput()) {
  7. $message .= "\n\nCommand output:\n" . $output;
  8. }
  9. if ($stderr = $process->getErrorOutput()) {
  10. $message .= "\n\nCommand stderr:\n" . $stderr;
  11. }
  12. parent::__construct($message);
  13. }
  14. }