mirror of
https://github.com/danog/file.git
synced 2024-12-02 09:17:57 +01:00
ee8f10f512
Also require PHP 8.1 and use features.
41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Amp\File\Test\Driver;
|
|
|
|
use Amp\File;
|
|
use Amp\File\Driver\UvFilesystemDriver;
|
|
use Amp\File\Test\FilesystemDriverTest;
|
|
use Revolt\EventLoop;
|
|
use Revolt\EventLoop\Driver\UvDriver as UvLoopDriver;
|
|
|
|
class UvFilesystemDriverTest extends FilesystemDriverTest
|
|
{
|
|
/**
|
|
* @dataProvider symlinkPathProvider
|
|
*
|
|
*/
|
|
public function testResolveSymlinkError(\Closure $linkResolver): void
|
|
{
|
|
if (\version_compare(\phpversion('uv'), '0.3.0', '<')) {
|
|
$this->markTestSkipped('UvDriver Test Skipped: Causes Crash');
|
|
}
|
|
|
|
parent::testResolveSymlinkError($linkResolver);
|
|
}
|
|
|
|
protected function createDriver(): File\FilesystemDriver
|
|
{
|
|
if (!\extension_loaded("uv")) {
|
|
$this->markTestSkipped("ext-uv not loaded");
|
|
}
|
|
|
|
$loop = EventLoop::getDriver();
|
|
|
|
if (!$loop instanceof UvLoopDriver) {
|
|
$this->markTestSkipped("Loop driver must be using ext-uv");
|
|
}
|
|
|
|
return new UvFilesystemDriver($loop);
|
|
}
|
|
}
|