You are here

public function vfsStreamPrintVisitorTestCase::visitDirectoryWritesDirectoryNameToStream in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php \org\bovigo\vfs\visitor\vfsStreamPrintVisitorTestCase::visitDirectoryWritesDirectoryNameToStream()

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitorTestCase.php, line 72

Class

vfsStreamPrintVisitorTestCase
Test for org\bovigo\vfs\visitor\vfsStreamPrintVisitor.

Namespace

org\bovigo\vfs\visitor

Code

public function visitDirectoryWritesDirectoryNameToStream() {
  $output = vfsStream::newFile('foo.txt')
    ->at(vfsStream::setup());
  $printVisitor = new vfsStreamPrintVisitor(fopen('vfs://root/foo.txt', 'wb'));
  $this
    ->assertSame($printVisitor, $printVisitor
    ->visitDirectory(vfsStream::newDirectory('baz')));
  $this
    ->assertEquals("- baz\n", $output
    ->getContent());
}