mirror of
https://github.com/danog/process.git
synced 2024-11-26 20:24:43 +01:00
Exclude tests against Libevent and Uv if the extensions are not loaded.
This commit is contained in:
parent
096c908973
commit
f709600db5
@ -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() {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user