1
0
mirror of https://github.com/danog/file.git synced 2024-11-26 20:04:51 +01:00
file/test/UvDriverTest.php
2017-03-16 22:39:49 -05:00

23 lines
574 B
PHP

<?php
namespace Amp\File\Test;
use Amp\Loop;
class UvDriverTest extends DriverTest {
protected function lRun(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"
);
}
}
}