當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Storage::setUp方法代碼示例

本文整理匯總了PHP中Storage::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP Storage::setUp方法的具體用法?PHP Storage::setUp怎麽用?PHP Storage::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Storage的用法示例。


在下文中一共展示了Storage::setUp方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 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));
 }
開發者ID:heldernl,項目名稱:owncloud8-extended,代碼行數:7,代碼來源:mappedlocalwithdotteddatadir.php

示例2: setUp

 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);
 }
開發者ID:kenwi,項目名稱:core,代碼行數:9,代碼來源:amazons3.php

示例3: setUp

 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);
 }
開發者ID:loulancn,項目名稱:core,代碼行數:9,代碼來源:swift.php

示例4: setUp

 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']);
 }
開發者ID:Kevin-ZK,項目名稱:vaneDisk,代碼行數:9,代碼來源:google.php

示例5: setUp

 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']);
 }
開發者ID:loulancn,項目名稱:core,代碼行數:12,代碼來源:dropbox.php

示例6: setUp

 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('/');
 }
開發者ID:evanjt,項目名稱:core,代碼行數:13,代碼來源:sftp_key.php

示例7: setUp

 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('/');
 }
開發者ID:Kevin-ZK,項目名稱:vaneDisk,代碼行數:16,代碼來源:webdav.php

示例8: setUp

 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('/');
 }
開發者ID:enoch85,項目名稱:owncloud-testserver,代碼行數:16,代碼來源:smb.php

示例9: setUp

	protected function setUp() {
		parent::setUp();

		$this->tmpDir = \OC_Helper::tmpFolder();
		$this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
	}
開發者ID:ninjasilicon,項目名稱:core,代碼行數:6,代碼來源:local.php

示例10: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
     $this->instance = new \OC\Files\Storage\CommonTest(array('datadir' => $this->tmpDir));
 }
開發者ID:TechArea,項目名稱:core,代碼行數:6,代碼來源:commontest.php

示例11: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->tmpFile = \OCP\Files::tmpFile('.tar.gz');
     $this->instance = new \OC\Files\Storage\Archive(array('archive' => $this->tmpFile));
 }
開發者ID:DOM-Digital-Online-Media,項目名稱:apps,代碼行數:6,代碼來源:storage.php


注:本文中的Storage::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。