Exemplo n.º 1
0
 public function testGetting()
 {
     $this->assertTrue(Locations::get(false));
     $this->assertTrue(is_array(Locations::get()));
     $this->assertNull(Locations::get('test2'));
     $this->assertTrue(is_array(Locations::get('test', array('config' => true))));
     $this->assertNull(Locations::get('test', array('autoCreate' => false)));
     $this->assertTrue(Locations::get('test'));
 }
Exemplo n.º 2
0
 protected function _init()
 {
     parent::_init();
     $this->_timestamp = time();
     $this->_tmp_dir = Libraries::path('li3_filemanager\\', array('dirs' => true));
     $this->_tmp_dir .= "/resources/tmp/{$this->_timestamp}_test";
     Locations::add('test', array('adapter' => 'FileSystem', 'url' => 'http://example.com/tmp', 'location' => $this->_tmp_dir));
     $this->_location = Locations::get('test');
 }
Exemplo n.º 3
0
 public function skip()
 {
     $this->skipIf(!in_array('test-ftp', Locations::get()), 'You don\'t have <code>test-ftp</code> location setup!');
     $this->skipIf(!is_object($this->_location = Locations::get('test-ftp')), 'Adapter not initialized!');
 }