public function ProcessTest::testIsRunning

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessTest.php, line 121

Class

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

Namespace

Symfony\Component\Process\Tests

Code

public function testIsRunning() {
  $process = new Process('php -r "sleep(1);"');
  $this
    ->assertFalse($process
    ->isRunning());
  $process
    ->start();
  $this
    ->assertTrue($process
    ->isRunning());
  $process
    ->wait();
  $this
    ->assertFalse($process
    ->isRunning());
}