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
|
|
|
|
2017-06-20 19:37:41 +02:00
|
|
|
use Amp\File;
|
2017-03-16 22:39:49 -05:00
|
|
|
use Amp\Loop;
|
2017-06-20 19:37:41 +02:00
|
|
|
use function Amp\asyncCall;
|
2017-03-16 22:39:49 -05:00
|
|
|
|
2015-07-30 10:10:53 -04:00
|
|
|
class UvDriverTest extends DriverTest {
|
2017-06-16 18:12:42 -05:00
|
|
|
protected function execute(callable $cb) {
|
2017-06-20 19:37:41 +02:00
|
|
|
if (!\extension_loaded("uv")) {
|
2015-07-17 10:27:38 -04:00
|
|
|
$this->markTestSkipped(
|
|
|
|
"php-uv extension not loaded"
|
|
|
|
);
|
|
|
|
}
|
2017-06-20 19:37:41 +02:00
|
|
|
|
|
|
|
$loop = new Loop\UvDriver;
|
|
|
|
|
|
|
|
Loop::set($loop);
|
|
|
|
Loop::run(function () use ($cb, $loop) {
|
|
|
|
File\filesystem(new File\UvDriver($loop));
|
|
|
|
asyncCall($cb);
|
|
|
|
});
|
2015-07-10 21:59:39 -04:00
|
|
|
}
|
2015-08-08 10:09:07 -04:00
|
|
|
}
|