diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-10-22 08:26:59 +0400 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-10-22 08:27:15 +0400 |
commit | 2c333826410e2c9f8e01a792ae40a5ebbd6cbd1e (patch) | |
tree | 001d0a58a2db7e3ad5bae570dcdce28d2ec308d9 /tests | |
parent | e4ff651cb63165cdb0fb063936eace08533fc492 (diff) |
Skip some tests that fail on OS X if the system is not supported
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Unit/CliMulti/ProcessTest.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/PHPUnit/Unit/CliMulti/ProcessTest.php b/tests/PHPUnit/Unit/CliMulti/ProcessTest.php index 755cd60b61..0fee8afd55 100644 --- a/tests/PHPUnit/Unit/CliMulti/ProcessTest.php +++ b/tests/PHPUnit/Unit/CliMulti/ProcessTest.php @@ -45,11 +45,19 @@ class ProcessTest extends PHPUnit_Framework_TestCase public function test_construct_shouldBeNotRunning_IfPidJustCreated() { + if (! Process::isSupported()) { + $this->markTestSkipped('Not supported'); + } + $this->assertFalse($this->process->isRunning()); } public function test_startProcess_finishProcess_ShouldMarkProcessAsStarted() { + if (! Process::isSupported()) { + $this->markTestSkipped('Not supported'); + } + $this->assertFalse($this->process->isRunning()); $this->assertFalse($this->process->hasStarted()); $this->assertFalse($this->process->hasFinished()); @@ -94,11 +102,11 @@ class ProcessTest extends PHPUnit_Framework_TestCase public function test_getSecondsSinceCreation() { - sleep(3); + sleep(2); $seconds = $this->process->getSecondsSinceCreation(); - $this->assertGreaterThanOrEqual(3, $seconds); - $this->assertLessThanOrEqual(4, $seconds); + $this->assertGreaterThanOrEqual(2, $seconds); + $this->assertLessThanOrEqual(3, $seconds); } }
\ No newline at end of file |