2016-12-29 20:59:59 -06:00
|
|
|
<?php
|
2015-07-10 21:59:39 -04:00
|
|
|
|
2015-08-05 10:55:56 -04:00
|
|
|
namespace Amp\File\Test;
|
2015-07-10 21:59:39 -04:00
|
|
|
|
2015-07-30 10:10:53 -04:00
|
|
|
class UvDriverTest extends DriverTest {
|
2016-07-21 01:33:03 +02:00
|
|
|
protected function lRun(callable $cb) {
|
2015-07-30 09:07:01 -04:00
|
|
|
if (\extension_loaded("uv")) {
|
2016-07-21 01:33:03 +02:00
|
|
|
$loop = new \Amp\Loop\UvLoop;
|
|
|
|
\Interop\Async\Loop::execute(function() use ($cb, $loop) {
|
|
|
|
\Amp\File\filesystem(new \Amp\File\UvDriver($loop));
|
|
|
|
\Amp\rethrow(new \Amp\Coroutine($cb()));
|
|
|
|
}, $loop);
|
2015-07-17 10:27:38 -04:00
|
|
|
} else {
|
|
|
|
$this->markTestSkipped(
|
|
|
|
"php-uv extension not loaded"
|
|
|
|
);
|
|
|
|
}
|
2015-07-10 21:59:39 -04:00
|
|
|
}
|
2015-08-08 10:09:07 -04:00
|
|
|
}
|