test case for dropbox storage
This commit is contained in:
parent
35c5f71989
commit
54695b11eb
|
@ -43,4 +43,13 @@ return array(
|
||||||
'secret'=>'test',
|
'secret'=>'test',
|
||||||
'bucket'=>'bucket',
|
'bucket'=>'bucket',
|
||||||
),
|
),
|
||||||
|
'dropbox' => array (
|
||||||
|
'run'=>false,
|
||||||
|
'root'=>'owncloud',
|
||||||
|
'configured' => 'true',
|
||||||
|
'app_key' => '',
|
||||||
|
'app_secret' => '',
|
||||||
|
'token' => '',
|
||||||
|
'token_secret' => ''
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
|
||||||
|
* This file is licensed under the Affero General Public License version 3 or
|
||||||
|
* later.
|
||||||
|
* See the COPYING-README file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$config=include('files_external/tests/config.php');
|
||||||
|
if(!is_array($config) or !isset($config['dropbox']) or !$config['dropbox']['run']) {
|
||||||
|
abstract class Test_Filestorage_Dropbox extends Test_FileStorage{}
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
class Test_Filestorage_Dropbox extends Test_FileStorage {
|
||||||
|
private $config;
|
||||||
|
|
||||||
|
public function setUp() {
|
||||||
|
$id=uniqid();
|
||||||
|
$this->config=include('files_external/tests/config.php');
|
||||||
|
$this->config['dropbox']['root'].='/'.$id;//make sure we have an new empty folder to work in
|
||||||
|
$this->instance=new OC_Filestorage_Dropbox($this->config['dropbox']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown() {
|
||||||
|
$this->instance->unlink('/');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue