本文整理匯總了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));
}
示例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);
}
示例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);
}
示例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']);
}
示例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']);
}
示例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('/');
}
示例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('/');
}
示例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('/');
}
示例9: setUp
protected function setUp() {
parent::setUp();
$this->tmpDir = \OC_Helper::tmpFolder();
$this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
}
示例10: setUp
protected function setUp()
{
parent::setUp();
$this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$this->instance = new \OC\Files\Storage\CommonTest(array('datadir' => $this->tmpDir));
}
示例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));
}