1
0
mirror of https://github.com/danog/file.git synced 2025-01-22 21:31:15 +01:00
file/test/Driver/UvFileTest.php

28 lines
614 B
PHP
Raw Normal View History

2020-06-30 21:45:09 +02:00
<?php
namespace Amp\File\Test\Driver;
use Amp\File;
use Amp\File\Driver\UvDriver;
use Amp\File\Test\AsyncFileTest;
2021-10-15 21:53:50 -05:00
use Revolt\EventLoop;
use Revolt\EventLoop\Driver\UvDriver as UvLoopDriver;
2020-06-30 21:45:09 +02:00
class UvFileTest extends AsyncFileTest
{
protected function createDriver(): File\Driver
{
if (!\extension_loaded("uv")) {
2021-10-15 21:53:50 -05:00
$this->markTestSkipped("ext-uv not loaded");
2020-06-30 21:45:09 +02:00
}
2021-10-15 21:53:50 -05:00
$loop = EventLoop::getDriver();
if (!$loop instanceof UvLoopDriver) {
$this->markTestSkipped("Loop driver must be using ext-uv");
}
2020-06-30 21:45:09 +02:00
return new UvDriver($loop);
}
}