コード例 #1
0
 public function testRemovesDuplicates()
 {
     vfsStreamWrapper::register();
     $structure = array('src' => array('src' => array(), 'Foo' => array('src' => array(), 'Foo' => array(), 'Bar.php' => '<?php')));
     vfsStream::create($structure, VfsStream::setup('project'));
     $dir = VfsStream::url('project/src');
     $directory = new Directory($dir, $dir);
     $files = $directory->findAllPhpFilesRecursivly();
     $foundFiles = array();
     foreach ($files as $f => $file) {
         $foundFiles[] = $f;
     }
     $this->assertEquals(array('vfs://project/src/Foo/Bar.php'), $foundFiles);
 }
コード例 #2
0
 public function setUp()
 {
     // Create web server document root
     $this->fileSystem = VfsStream::setup('doc_root', null, ['var' => ['www' => ['html' => ['public' => []]]]]);
     AutoVersion::setDocumentRoot(VfsStream::url('doc_root'));
 }