You are here

public function vfsStreamStructureVisitorTestCase::visitFileCreatesStructureForFile in Zircon Profile 8.0

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

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitorTestCase.php, line 24

Class

vfsStreamStructureVisitorTestCase
Test for org\bovigo\vfs\visitor\vfsStreamStructureVisitor.

Namespace

org\bovigo\vfs\visitor

Code

public function visitFileCreatesStructureForFile() {
  $structureVisitor = new vfsStreamStructureVisitor();
  $this
    ->assertEquals(array(
    'foo.txt' => 'test',
  ), $structureVisitor
    ->visitFile(vfsStream::newFile('foo.txt')
    ->withContent('test'))
    ->getStructure());
}