See also: https://github.com/mikey179/vfsStream/issues/10
Since: 0.10.0
Inheritance: extends vfsStreamAbstractVisitor
Beispiel #1
0
 /**
  * Dump current files structure
  *
  * @return array
  */
 public function dump()
 {
     $currentRoot = StreamWrapper::getRoot();
     if (!$currentRoot) {
         return array();
     }
     $visitor = new StreamVisitor();
     $visitor->visit($currentRoot);
     return $visitor->getStructure();
 }
 /**
  * @test
  */
 public function visitRecursiveDirectoryStructure()
 {
     $root = vfsStream::setup('root', null, array('test' => array('foo' => array('test.txt' => 'hello'), 'baz.txt' => 'world'), 'foo.txt' => ''));
     $structureVisitor = new vfsStreamStructureVisitor();
     $this->assertEquals(array('root' => array('test' => array('foo' => array('test.txt' => 'hello'), 'baz.txt' => 'world'), 'foo.txt' => '')), $structureVisitor->visitDirectory($root)->getStructure());
 }