1
0
mirror of https://github.com/danog/file.git synced 2024-11-30 04:19:39 +01:00
file/test/UvHandleTest.php
2017-06-20 00:31:58 -05:00

23 lines
583 B
PHP

<?php
namespace Amp\File\Test;
use Amp\Loop;
class UvHandleTest extends AsyncHandleTest {
protected function execute(callable $cb) {
if (\extension_loaded("uv")) {
$loop = new Loop\UvDriver;
Loop::set($loop);
Loop::run(function () use ($cb, $loop) {
\Amp\File\filesystem(new \Amp\File\UvDriver($loop));
\Amp\Promise\rethrow(new \Amp\Coroutine($cb()));
});
} else {
$this->markTestSkipped(
"php-uv extension not loaded"
);
}
}
}