Skip to content
Browse files

[Process] fixed a unit test

  • Loading branch information...
1 parent 7394032 commit 49871ad600b777bee4f041e1d085a5047ad52843 @fabpot fabpot committed Oct 4, 2012
Showing with 11 additions and 11 deletions.
  1. +11 −11 Tests/AbstractProcessTest.php
View
22 Tests/AbstractProcessTest.php
@@ -242,20 +242,20 @@ public function testProcessWithTermSignal()
public function testRestart()
{
- $process1 = new Process('php -r "echo getmypid();"');
- $process1->run();
- $process2 = $process1->restart();
+ $process1 = $this->getProcess('php -r "echo getmypid();"');
+ $process1->run();
+ $process2 = $process1->restart();
- usleep(300000); // wait for output
+ usleep(300000); // wait for output
- // Ensure that both processed finished and the output is numeric
- $this->assertFalse($process1->isRunning());
- $this->assertFalse($process2->isRunning());
- $this->assertTrue(is_numeric($process1->getOutput()));
- $this->assertTrue(is_numeric($process2->getOutput()));
+ // Ensure that both processed finished and the output is numeric
+ $this->assertFalse($process1->isRunning());
+ $this->assertFalse($process2->isRunning());
+ $this->assertTrue(is_numeric($process1->getOutput()));
+ $this->assertTrue(is_numeric($process2->getOutput()));
- // Ensure that restart returned a new process by check that the output is different
- $this->assertNotEquals($process1->getOutput(), $process2->getOutput());
+ // Ensure that restart returned a new process by check that the output is different
+ $this->assertNotEquals($process1->getOutput(), $process2->getOutput());
}
public function testPhpDeadlock()

0 comments on commit 49871ad

Please sign in to comment.
Something went wrong with that request. Please try again.