protected function setUp()
 {
     parent::setUp();
     $this->tmpDir = \OC_Helper::tmpFolder() . 'dir.123' . DIRECTORY_SEPARATOR;
     mkdir($this->tmpDir);
     $this->instance = new \OC\Files\Storage\MappedLocal(array('datadir' => $this->tmpDir));
 }
Example #2
0
 protected function setUp()
 {
     parent::setUp();
     $this->config = (include 'files_external/tests/config.amazons3.php');
     if (!is_array($this->config) or !$this->config['run']) {
         $this->markTestSkipped('AmazonS3 backend not configured');
     }
     $this->instance = new \OC\Files\Storage\AmazonS3($this->config);
 }
Example #3
0
 protected function setUp()
 {
     parent::setUp();
     $this->config = (include 'files_external/tests/config.swift.php');
     if (!is_array($this->config) or !$this->config['run']) {
         $this->markTestSkipped('OpenStack Object Storage backend not configured');
     }
     $this->instance = new \OC\Files\Storage\Swift($this->config);
 }
Example #4
0
 protected function setUp()
 {
     parent::setUp();
     $this->config = (include 'files_external/tests/config.php');
     if (!is_array($this->config) || !isset($this->config['google']) || !$this->config['google']['run']) {
         $this->markTestSkipped('Google Drive backend not configured');
     }
     $this->instance = new \OC\Files\Storage\Google($this->config['google']);
 }
Example #5
0
 protected function setUp()
 {
     parent::setUp();
     $id = $this->getUniqueID();
     $this->config = (include 'files_external/tests/config.php');
     if (!is_array($this->config) or !isset($this->config['dropbox']) or !$this->config['dropbox']['run']) {
         $this->markTestSkipped('Dropbox backend not configured');
     }
     $this->config['dropbox']['root'] .= '/' . $id;
     //make sure we have an new empty folder to work in
     $this->instance = new \OC\Files\Storage\Dropbox($this->config['dropbox']);
 }
Example #6
0
 protected function setUp()
 {
     parent::setUp();
     $id = $this->getUniqueID();
     $this->config = (include 'files_external/tests/config.php');
     if (!is_array($this->config) or !isset($this->config['sftp_key']) or !$this->config['sftp_key']['run']) {
         $this->markTestSkipped('SFTP with key backend not configured');
     }
     // Make sure we have an new empty folder to work in
     $this->config['sftp_key']['root'] .= '/' . $id;
     $this->instance = new \OC\Files\Storage\SFTP_Key($this->config['sftp_key']);
     $this->instance->mkdir('/');
 }
Example #7
0
 protected function setUp()
 {
     parent::setUp();
     $id = $this->getUniqueID();
     $config = (include 'files_external/tests/config.webdav.php');
     if (!is_array($config) or !$config['run']) {
         $this->markTestSkipped('WebDAV backend not configured');
     }
     if (isset($config['wait'])) {
         $this->waitDelay = $config['wait'];
     }
     $config['root'] .= '/' . $id;
     //make sure we have an new empty folder to work in
     $this->instance = new \OC\Files\Storage\DAV($config);
     $this->instance->mkdir('/');
 }
Example #8
0
 protected function setUp()
 {
     parent::setUp();
     $id = $this->getUniqueID();
     $config = (include 'files_external/tests/config.smb.php');
     if (!is_array($config) or !$config['run']) {
         $this->markTestSkipped('Samba backend not configured');
     }
     if (substr($config['root'], -1, 1) != '/') {
         $config['root'] .= '/';
     }
     $config['root'] .= $id;
     //make sure we have an new empty folder to work in
     $this->instance = new \OC\Files\Storage\SMB($config);
     $this->instance->mkdir('/');
 }
Example #9
0
	protected function setUp() {
		parent::setUp();

		$this->tmpDir = \OC_Helper::tmpFolder();
		$this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
	}
Example #10
0
 protected function setUp()
 {
     parent::setUp();
     $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
     $this->instance = new \OC\Files\Storage\CommonTest(array('datadir' => $this->tmpDir));
 }
Example #11
0
 protected function setUp()
 {
     parent::setUp();
     $this->tmpFile = \OCP\Files::tmpFile('.tar.gz');
     $this->instance = new \OC\Files\Storage\Archive(array('archive' => $this->tmpFile));
 }