public function AbstractProcessTest::testStatus in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/Tests/AbstractProcessTest.php \Symfony\Component\Process\Tests\AbstractProcessTest::testStatus()
File
- vendor/
symfony/ process/ Tests/ AbstractProcessTest.php, line 604
Class
- AbstractProcessTest
- @author Robert Schönthal <seroscho@googlemail.com>
Namespace
Symfony\Component\Process\TestsCode
public function testStatus() {
$process = $this
->getProcess(self::$phpBin . ' -r "usleep(500000);"');
$this
->assertFalse($process
->isRunning());
$this
->assertFalse($process
->isStarted());
$this
->assertFalse($process
->isTerminated());
$this
->assertSame(Process::STATUS_READY, $process
->getStatus());
$process
->start();
$this
->assertTrue($process
->isRunning());
$this
->assertTrue($process
->isStarted());
$this
->assertFalse($process
->isTerminated());
$this
->assertSame(Process::STATUS_STARTED, $process
->getStatus());
$process
->wait();
$this
->assertFalse($process
->isRunning());
$this
->assertTrue($process
->isStarted());
$this
->assertTrue($process
->isTerminated());
$this
->assertSame(Process::STATUS_TERMINATED, $process
->getStatus());
}