public function AbstractProcessTest::testExitCodeCommandFailed

2 calls to AbstractProcessTest::testExitCodeCommandFailed()
SigchildDisabledProcessTest::testExitCodeCommandFailed in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException
SimpleProcessTest::testExitCodeCommandFailed in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php
2 methods override AbstractProcessTest::testExitCodeCommandFailed()
SigchildDisabledProcessTest::testExitCodeCommandFailed in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException
SimpleProcessTest::testExitCodeCommandFailed in drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php, line 178

Class

AbstractProcessTest
@author Robert Schönthal <seroscho@googlemail.com>

Namespace

Symfony\Component\Process\Tests

Code

public function testExitCodeCommandFailed() {
  if (defined('PHP_WINDOWS_VERSION_BUILD')) {
    $this
      ->markTestSkipped('Windows does not support POSIX exit code');
  }

  // such command run in bash return an exitcode 127
  $process = $this
    ->getProcess('nonexistingcommandIhopeneversomeonewouldnameacommandlikethis');
  $process
    ->run();
  $this
    ->assertGreaterThan(0, $process
    ->getExitCode());
}