1
0
mirror of https://github.com/danog/file.git synced 2025-01-22 13:21:13 +01:00
file/test/UvDriverTest.php

23 lines
578 B
PHP
Raw Normal View History

<?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
use Amp\Loop;
2015-07-30 10:10:53 -04:00
class UvDriverTest extends DriverTest {
protected function execute(callable $cb) {
if (\extension_loaded("uv")) {
$loop = new Loop\UvDriver;
Loop::set($loop);
2017-06-17 23:41:57 +02:00
Loop::run(function () use ($cb, $loop) {
2016-07-21 01:33:03 +02:00
\Amp\File\filesystem(new \Amp\File\UvDriver($loop));
\Amp\Promise\rethrow(new \Amp\Coroutine($cb()));
});
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
}