diff --git a/tests/LibeventReactorProcessTest.php b/tests/LibeventReactorProcessTest.php index 88a50f3..1a2ec04 100644 --- a/tests/LibeventReactorProcessTest.php +++ b/tests/LibeventReactorProcessTest.php @@ -6,8 +6,14 @@ use Amp\LibeventReactor; class LibeventReactorProcessTest extends AbstractProcessTest { - public function setUp(){ - \Amp\reactor(new LibeventReactor()); + protected function setUp() { + if (extension_loaded("libevent")) { + \Amp\reactor($assign = new LibeventReactor); + } else { + $this->markTestSkipped( + "libevent extension not loaded" + ); + } } public function testReactor() { diff --git a/tests/UvReactorProcessTest.php b/tests/UvReactorProcessTest.php index 3e71cb0..fed1be9 100644 --- a/tests/UvReactorProcessTest.php +++ b/tests/UvReactorProcessTest.php @@ -7,7 +7,13 @@ use Amp\UvReactor; class UvReactorProcessTest extends AbstractProcessTest { public function setUp(){ - \Amp\reactor(new UvReactor()); + if (extension_loaded("uv")) { + \Amp\reactor($assign = new UvReactor); + } else { + $this->markTestSkipped( + "php-uv extension not loaded" + ); + } } public function testReactor() {