public function vfsStreamPrintVisitorTestCase::visitRecursiveDirectoryStructure in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php \org\bovigo\vfs\visitor\vfsStreamPrintVisitorTestCase::visitRecursiveDirectoryStructure()
@test
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ visitor/ vfsStreamPrintVisitorTestCase.php, line 86
Class
Namespace
org\bovigo\vfs\visitorCode
public function visitRecursiveDirectoryStructure() {
$root = vfsStream::setup('root', null, array(
'test' => array(
'foo' => array(
'test.txt' => 'hello',
),
'baz.txt' => 'world',
),
'foo.txt' => '',
));
$printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb'));
$this
->assertSame($printVisitor, $printVisitor
->visitDirectory($root));
$this
->assertEquals("- root\n - test\n - foo\n - test.txt\n - baz.txt\n - foo.txt\n", file_get_contents('vfs://root/foo.txt'));
}