See also: https://github.com/mikey179/vfsStream/issues/10
Since: 0.10.0
Inheritance: extends vfsStreamAbstractVisitor
コード例 #1
0
ファイル: Vfs.php プロジェクト: tiagosampaio/EcomDev_PHPUnit
 /**
  * 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();
 }
コード例 #2
0
 /**
  * @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());
 }