Skip to content
Extraits de code Groupes Projets
Valider 2c333826 rédigé par Matthieu Napoli's avatar Matthieu Napoli
Parcourir les fichiers

Skip some tests that fail on OS X if the system is not supported

parent e4ff651c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -45,11 +45,19 @@ class ProcessTest extends PHPUnit_Framework_TestCase ...@@ -45,11 +45,19 @@ class ProcessTest extends PHPUnit_Framework_TestCase
public function test_construct_shouldBeNotRunning_IfPidJustCreated() public function test_construct_shouldBeNotRunning_IfPidJustCreated()
{ {
if (! Process::isSupported()) {
$this->markTestSkipped('Not supported');
}
$this->assertFalse($this->process->isRunning()); $this->assertFalse($this->process->isRunning());
} }
public function test_startProcess_finishProcess_ShouldMarkProcessAsStarted() public function test_startProcess_finishProcess_ShouldMarkProcessAsStarted()
{ {
if (! Process::isSupported()) {
$this->markTestSkipped('Not supported');
}
$this->assertFalse($this->process->isRunning()); $this->assertFalse($this->process->isRunning());
$this->assertFalse($this->process->hasStarted()); $this->assertFalse($this->process->hasStarted());
$this->assertFalse($this->process->hasFinished()); $this->assertFalse($this->process->hasFinished());
...@@ -94,11 +102,11 @@ class ProcessTest extends PHPUnit_Framework_TestCase ...@@ -94,11 +102,11 @@ class ProcessTest extends PHPUnit_Framework_TestCase
public function test_getSecondsSinceCreation() public function test_getSecondsSinceCreation()
{ {
sleep(3); sleep(2);
$seconds = $this->process->getSecondsSinceCreation(); $seconds = $this->process->getSecondsSinceCreation();
$this->assertGreaterThanOrEqual(3, $seconds); $this->assertGreaterThanOrEqual(2, $seconds);
$this->assertLessThanOrEqual(4, $seconds); $this->assertLessThanOrEqual(3, $seconds);
} }
} }
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter