Esempio n. 1
0
 /**
  * Setup test data
  */
 public function setUp()
 {
     $_SERVER['HTTP_HOST'] = 'test.dev';
     $_SERVER['REQUEST_URI'] = '/request';
     $this->_fixtPath = PROJECT_ROOT . '/tests/fixtures';
     $this->_cachePath = PROJECT_ROOT . '/build/cache';
     // cleanup
     $this->_fs = new Filesystem();
     $this->_fs->remove($this->_cachePath);
     $this->_fs->mkdir($this->_cachePath);
     // Prepare lib
     $this->_path = new Path();
     $this->_path->setRoot($this->_fixtPath);
     $this->_path->set('assets', 'root:assets');
     $this->_manager = new Manager($this->_path);
     $this->_factory = $this->_manager->getFactory();
     $this->_collection = $this->_manager->getCollection();
 }
Esempio n. 2
0
 public function testGetRoot()
 {
     $dir = __DIR__;
     $path = new Path();
     $path->setRoot($dir);
     $manager = new Manager($path);
     isSame(FS::clean($dir), FS::clean($manager->getPath()->getRoot()));
 }