<?php
use org\bovigo\vfs\vfsStream;
use PHPUnit\Framework\TestCase;
class Fs2Test extends TestCase
{
private $fs;
/**
* @before
*/
public function beforeTest()
{
$baseDir = vfsStream::setup('project');
$structure = array(
'files' => array(
'text' => array('config.yml' => 'db.username: test, db.password: pass'),
'php' => array(
'lib' => array('Library.php' => 'dump($test); array_map('),
'util' => array(
'Finder.php' => 'array_merge(',
'Foo.php' => 'dump($foo); echo $foo;',
),
),
),
);
vfsStream::create($structure, $baseDir);
$this->fs = vfsStream::url('project');
}
public function testFs() : void
{
$this->assertFileExists($this->fs . '/files/text/config.yml');
$this->assertFileExists($this->fs . '/files/php/lib/Library.php');
$this->assertFileExists($this->fs . '/files/php/util/Foo.php');
$this->assertFileExists($this->fs . '/files/php');
}
}