mirror of
https://github.com/danog/file.git
synced 2024-11-26 11:54:54 +01:00
28 lines
548 B
PHP
28 lines
548 B
PHP
<?php
|
|
|
|
namespace Amp\File\Test;
|
|
|
|
use Amp\File;
|
|
use Amp\Loop;
|
|
use function Amp\asyncCall;
|
|
|
|
class UvHandleTest extends AsyncHandleTest
|
|
{
|
|
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);
|
|
});
|
|
}
|
|
}
|