summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-07-23 12:23:08 -0700
committerBart Visscher <bartv@thisnet.nl>2013-07-23 12:23:08 -0700
commit7ad38535e51812e08042e46bd550aa9cc5781955 (patch)
treee31d8023eb5b092027f9a7427413647f99d3be46 /apps/files_external/tests
parentf7422ad132e68c901c5658bbba1bffa626efaa37 (diff)
parentc904504365b6faa3113c19205e5216dcb81ebb68 (diff)
downloadnextcloud-server-7ad38535e51812e08042e46bd550aa9cc5781955.tar.gz
nextcloud-server-7ad38535e51812e08042e46bd550aa9cc5781955.zip
Merge pull request #3392 from owncloud/googledrive
Switch to using Google Drive SDK, closes #2047
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/config.php11
-rw-r--r--apps/files_external/tests/google.php18
2 files changed, 15 insertions, 14 deletions
diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php
index ca7bf50038f..d4a69d29c0f 100644
--- a/apps/files_external/tests/config.php
+++ b/apps/files_external/tests/config.php
@@ -24,12 +24,11 @@ return array(
'root'=>'/owncloud/files/webdav.php',
),
'google'=>array(
- 'run'=>false,
- 'consumer_key'=>'anonymous',
- 'consumer_secret'=>'anonymous',
- 'token'=>'test',
- 'token_secret'=>'test',
- 'root'=>'/google',
+ 'run'=> false,
+ 'configured' => 'true',
+ 'client_id' => '',
+ 'client_secret' => '',
+ 'token' => '',
),
'swift'=>array(
'run'=>false,
diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php
index f344163a8b9..12faabb902d 100644
--- a/apps/files_external/tests/google.php
+++ b/apps/files_external/tests/google.php
@@ -1,5 +1,4 @@
<?php
-
/**
* ownCloud
*
@@ -22,22 +21,25 @@
namespace Test\Files\Storage;
+require_once 'files_external/lib/google.php';
+
class Google extends Storage {
+
private $config;
- public function setUp() {
- $id = uniqid();
+ protected function setUp() {
$this->config = include('files_external/tests/config.php');
- if ( ! is_array($this->config) or ! isset($this->config['google']) or ! $this->config['google']['run']) {
- $this->markTestSkipped('Google backend not configured');
+ if (!is_array($this->config) || !isset($this->config['google'])
+ || !$this->config['google']['run']
+ ) {
+ $this->markTestSkipped('Google Drive backend not configured');
}
- $this->config['google']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
$this->instance = new \OC\Files\Storage\Google($this->config['google']);
}
- public function tearDown() {
+ protected function tearDown() {
if ($this->instance) {
$this->instance->rmdir('/');
}
}
-}
+} \ No newline at end of file