本文整理汇总了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));
}