1
0
mirror of https://github.com/danog/file.git synced 2024-11-26 20:04:51 +01:00
file/test/UvDriverTest.php
2017-06-20 19:37:41 +02:00

26 lines
539 B
PHP

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