summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-08 13:50:59 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-08 13:53:53 +0200
commite7899e17dea21d5b5e8d2e3ccd1640ab7684d685 (patch)
tree469a431482bffe6e4c17b9724d5a75cd1331b5f0 /apps/files_external/tests
parentb9b9fd9dbaae47b3a15aed9694c18b95404550b0 (diff)
parent2de94f9c8574d8662bf0993999ca2f7bbff1f115 (diff)
downloadnextcloud-server-e7899e17dea21d5b5e8d2e3ccd1640ab7684d685.tar.gz
nextcloud-server-e7899e17dea21d5b5e8d2e3ccd1640ab7684d685.zip
merge phpunit into filesystem
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/config.php9
-rw-r--r--apps/files_external/tests/dropbox.php28
2 files changed, 37 insertions, 0 deletions
diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php
index e58a87fabdf..7779f618948 100644
--- a/apps/files_external/tests/config.php
+++ b/apps/files_external/tests/config.php
@@ -43,4 +43,13 @@ return array(
'secret'=>'test',
'bucket'=>'bucket',
),
+ 'dropbox' => array (
+ 'run'=>false,
+ 'root'=>'owncloud',
+ 'configured' => 'true',
+ 'app_key' => '',
+ 'app_secret' => '',
+ 'token' => '',
+ 'token_secret' => ''
+ )
);
diff --git a/apps/files_external/tests/dropbox.php b/apps/files_external/tests/dropbox.php
new file mode 100644
index 00000000000..64eb2556c92
--- /dev/null
+++ b/apps/files_external/tests/dropbox.php
@@ -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('/');
+ }
+ }
+}