public static inspect ( org\bovigo\vfs\visitor\vfsStreamVisitor $visitor, org\bovigo\vfs\vfsStreamContent $content = null ) : org\bovigo\vfs\visitor\vfsStreamVisitor | ||
$visitor | org\bovigo\vfs\visitor\vfsStreamVisitor | the visitor who inspects |
$content | org\bovigo\vfs\vfsStreamContent | directory structure to inspect |
return | org\bovigo\vfs\visitor\vfsStreamVisitor |
public static function inspect(vfsStreamVisitor $visitor, vfsStreamContent $content = null)
{
if (null !== $content) {
return $visitor->visit($content);
}
$root = vfsStreamWrapper::getRoot();
if (null === $root) {
throw new \InvalidArgumentException('No content given and no root directory set.');
}
return $visitor->visitDirectory($root);
}
public function testConstruct() { $this->assertFileExists($this->configDir->url() . DIRECTORY_SEPARATOR . 'test'); unset($configHandler); new ConfigFileHandler('test-process', $this->configDirPath); $this->assertEquals(['root' => ['test' => []]], vfsStream::inspect(new vfsStreamStructureVisitor())->getStructure()); }