2015-07-20 21:42:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Amp\Test;
|
|
|
|
|
|
|
|
use Amp\EvReactor;
|
|
|
|
|
|
|
|
class EvReactorTest extends ReactorTest {
|
|
|
|
protected function getReactor() {
|
|
|
|
if (extension_loaded("ev")) {
|
2015-07-21 04:24:51 +02:00
|
|
|
return new EvReactor;
|
2015-07-20 21:42:42 +02:00
|
|
|
} else {
|
|
|
|
$this->markTestSkipped(
|
|
|
|
"ev extension not loaded"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2015-07-22 17:38:17 +02:00
|
|
|
|
|
|
|
public function testImmediateCoroutineResolutionError() {
|
|
|
|
if (\extension_loaded("xdebug")) {
|
|
|
|
$this->markTestSkipped(
|
|
|
|
"Cannot run this test with xdebug enabled: it causes zend_mm_heap corrupted"
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
parent::testImmediateCoroutineResolutionError();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testOnErrorFailure() {
|
|
|
|
if (\extension_loaded("xdebug")) {
|
|
|
|
$this->markTestSkipped(
|
|
|
|
"Cannot run this test with xdebug enabled: it causes zend_mm_heap corrupted"
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
parent::testImmediateCoroutineResolutionError();
|
|
|
|
}
|
|
|
|
}
|
2015-07-20 21:42:42 +02:00
|
|
|
}
|