aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/dropbox.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-11 22:54:39 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-11 22:54:39 +0200
commitfb2d2bc2011c371ff1e4334f84494f15a84a07a2 (patch)
treeb5c20c842441ce4288038909daa5a158c8e74e80 /apps/files_external/tests/dropbox.php
parent5c6e9518edde10e0c23d0d734d2cc6d161fc15c0 (diff)
parentee28e35ba93032a3d43601c030d3d44df9b092f0 (diff)
downloadnextcloud-server-fb2d2bc2011c371ff1e4334f84494f15a84a07a2.tar.gz
nextcloud-server-fb2d2bc2011c371ff1e4334f84494f15a84a07a2.zip
merge master into filesystem
Diffstat (limited to 'apps/files_external/tests/dropbox.php')
-rw-r--r--apps/files_external/tests/dropbox.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/apps/files_external/tests/dropbox.php b/apps/files_external/tests/dropbox.php
index e77e0767c91..c517ef4cbb7 100644
--- a/apps/files_external/tests/dropbox.php
+++ b/apps/files_external/tests/dropbox.php
@@ -8,22 +8,21 @@
namespace Test\Files\Storage;
-$config=include('files_external/tests/config.php');
-if(!is_array($config) or !isset($config['dropbox']) or !$config['dropbox']['run']) {
- abstract class Dropbox extends Storage{}
- return;
-}else{
- class Dropbox extends Storage {
- private $config;
+class Dropbox extends Storage {
+ 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\Files\Storage\Dropbox($this->config['dropbox']);
+ public function setUp() {
+ $id = uniqid();
+ $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']);
+ }
- public function tearDown() {
+ public function tearDown() {
+ if ($this->instance) {
$this->instance->unlink('/');
}
}