You are here

public function AbstractProcessTest::testExitCodeCommandFailed in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/Tests/AbstractProcessTest.php \Symfony\Component\Process\Tests\AbstractProcessTest::testExitCodeCommandFailed()
2 calls to AbstractProcessTest::testExitCodeCommandFailed()
SigchildDisabledProcessTest::testExitCodeCommandFailed in vendor/symfony/process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.
SimpleProcessTest::testExitCodeCommandFailed in vendor/symfony/process/Tests/SimpleProcessTest.php
2 methods override AbstractProcessTest::testExitCodeCommandFailed()
SigchildDisabledProcessTest::testExitCodeCommandFailed in vendor/symfony/process/Tests/SigchildDisabledProcessTest.php
@expectedException \Symfony\Component\Process\Exception\RuntimeException @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.
SimpleProcessTest::testExitCodeCommandFailed in vendor/symfony/process/Tests/SimpleProcessTest.php

File

vendor/symfony/process/Tests/AbstractProcessTest.php, line 452

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testExitCodeCommandFailed() {
  if ('\\' === DIRECTORY_SEPARATOR) {
    $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());
}