zhamao-framework/tests/Trait/HasVirtualFileSystem.php

19 lines
311 B
PHP
Raw Normal View History

2022-12-23 20:22:43 +08:00
<?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);
}
}