summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/amazons3.php10
-rw-r--r--apps/files_external/tests/ftp.php10
-rw-r--r--apps/files_external/tests/google.php8
-rw-r--r--apps/files_external/tests/smb.php10
-rw-r--r--apps/files_external/tests/swift.php8
-rw-r--r--apps/files_external/tests/webdav.php8
6 files changed, 33 insertions, 21 deletions
diff --git a/apps/files_external/tests/amazons3.php b/apps/files_external/tests/amazons3.php
index b9b4cf65bd6..cf372aecbd7 100644
--- a/apps/files_external/tests/amazons3.php
+++ b/apps/files_external/tests/amazons3.php
@@ -20,12 +20,14 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+namespace Test\Files\Storage;
+
$config = include('apps/files_external/tests/config.php');
if (!is_array($config) or !isset($config['amazons3']) or !$config['amazons3']['run']) {
- abstract class Test_Filestorage_AmazonS3 extends Test_FileStorage{}
+ abstract class AmazonS3 extends Storage{}
return;
} else {
- class Test_Filestorage_AmazonS3 extends Test_FileStorage {
+ class AmazonS3 extends Storage {
private $config;
private $id;
@@ -34,11 +36,11 @@ if (!is_array($config) or !isset($config['amazons3']) or !$config['amazons3']['r
$id = uniqid();
$this->config = include('apps/files_external/tests/config.php');
$this->config['amazons3']['bucket'] = $id; // Make sure we have a new empty bucket to work in
- $this->instance = new OC_Filestorage_AmazonS3($this->config['amazons3']);
+ $this->instance = new \OC\Files\Storage\AmazonS3($this->config['amazons3']);
}
public function tearDown() {
- $s3 = new AmazonS3(array('key' => $this->config['amazons3']['key'], 'secret' => $this->config['amazons3']['secret']));
+ $s3 = new \AmazonS3(array('key' => $this->config['amazons3']['key'], 'secret' => $this->config['amazons3']['secret']));
if ($s3->delete_all_objects($this->id)) {
$s3->delete_bucket($this->id);
}
diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php
index 12f3ec3908d..8a0821e25a5 100644
--- a/apps/files_external/tests/ftp.php
+++ b/apps/files_external/tests/ftp.php
@@ -6,23 +6,25 @@
* See the COPYING-README file.
*/
+namespace Test\Files\Storage;
+
$config=include('apps/files_external/tests/config.php');
if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']) {
- abstract class Test_Filestorage_FTP extends Test_FileStorage{}
+ abstract class FTP extends Storage{}
return;
}else{
- class Test_Filestorage_FTP extends Test_FileStorage {
+ class FTP extends Storage {
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$this->config['ftp']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_FTP($this->config['ftp']);
+ $this->instance=new \OC\Files\Storage\FTP($this->config['ftp']);
}
public function tearDown() {
- OCP\Files::rmdirr($this->instance->constructUrl(''));
+ \OCP\Files::rmdirr($this->instance->constructUrl(''));
}
}
}
diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php
index d2a6358ade4..fff6461c912 100644
--- a/apps/files_external/tests/google.php
+++ b/apps/files_external/tests/google.php
@@ -20,12 +20,14 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+namespace Test\Files\Storage;
+
$config=include('apps/files_external/tests/config.php');
if(!is_array($config) or !isset($config['google']) or !$config['google']['run']) {
- abstract class Test_Filestorage_Google extends Test_FileStorage{}
+ abstract class Google extends Storage{}
return;
}else{
- class Test_Filestorage_Google extends Test_FileStorage {
+ class Google extends Storage {
private $config;
@@ -33,7 +35,7 @@ if(!is_array($config) or !isset($config['google']) or !$config['google']['run'])
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$this->config['google']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_Google($this->config['google']);
+ $this->instance=new \OC\Files\Storage\Google($this->config['google']);
}
public function tearDown() {
diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php
index 7de4fddbb34..87b110a241c 100644
--- a/apps/files_external/tests/smb.php
+++ b/apps/files_external/tests/smb.php
@@ -8,22 +8,24 @@
$config=include('apps/files_external/tests/config.php');
+namespace Test\Files\Storage;
+
if(!is_array($config) or !isset($config['smb']) or !$config['smb']['run']) {
- abstract class Test_Filestorage_SMB extends Test_FileStorage{}
+ abstract class SMB extends Storage{}
return;
}else{
- class Test_Filestorage_SMB extends Test_FileStorage {
+ class SMB extends Storage {
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$this->config['smb']['root'].=$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_SMB($this->config['smb']);
+ $this->instance=new \OC\Files\Storage\SMB($this->config['smb']);
}
public function tearDown() {
- OCP\Files::rmdirr($this->instance->constructUrl(''));
+ \OCP\Files::rmdirr($this->instance->constructUrl(''));
}
}
}
diff --git a/apps/files_external/tests/swift.php b/apps/files_external/tests/swift.php
index a6f5eace1c8..98a97f99b5b 100644
--- a/apps/files_external/tests/swift.php
+++ b/apps/files_external/tests/swift.php
@@ -6,19 +6,21 @@
* See the COPYING-README file.
*/
+namespace Test\Files\Storage;
+
$config=include('apps/files_external/tests/config.php');
if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']) {
- abstract class Test_Filestorage_SWIFT extends Test_FileStorage{}
+ abstract class SWIFT extends Storage{}
return;
}else{
- class Test_Filestorage_SWIFT extends Test_FileStorage {
+ class SWIFT extends Storage {
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$this->config['swift']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_SWIFT($this->config['swift']);
+ $this->instance=new \OC\Files\Storage\SWIFT($this->config['swift']);
}
diff --git a/apps/files_external/tests/webdav.php b/apps/files_external/tests/webdav.php
index 74d980aa3f1..cddd0d513ed 100644
--- a/apps/files_external/tests/webdav.php
+++ b/apps/files_external/tests/webdav.php
@@ -6,19 +6,21 @@
* See the COPYING-README file.
*/
+namespace Test\Files\Storage;
+
$config=include('apps/files_external/tests/config.php');
if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run']) {
- abstract class Test_Filestorage_DAV extends Test_FileStorage{}
+ abstract class DAV extends Storage{}
return;
}else{
- class Test_Filestorage_DAV extends Test_FileStorage {
+ class DAV extends Storage {
private $config;
public function setUp() {
$id=uniqid();
$this->config=include('apps/files_external/tests/config.php');
$this->config['webdav']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_DAV($this->config['webdav']);
+ $this->instance=new \OC\Files\Storage\DAV($this->config['webdav']);
}
public function tearDown() {