mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-07 00:35:36 +08:00
add FileSystemTest
This commit is contained in:
18
tests/Trait/HasVirtualFileSystem.php
Normal file
18
tests/Trait/HasVirtualFileSystem.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Trait;
|
||||
|
||||
use org\bovigo\vfs\vfsStream;
|
||||
use org\bovigo\vfs\vfsStreamDirectory;
|
||||
|
||||
trait HasVirtualFileSystem
|
||||
{
|
||||
private vfsStreamDirectory $vfs;
|
||||
|
||||
private function setUpVfs(string $dir = 'root'): void
|
||||
{
|
||||
$this->vfs = vfsStream::setup($dir);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user