summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/ftp.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/ftp.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/ftp.php')
-rw-r--r--apps/files_external/tests/ftp.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php
index 8a0821e25a5..3e6208e4a0d 100644
--- a/apps/files_external/tests/ftp.php
+++ b/apps/files_external/tests/ftp.php
@@ -8,22 +8,21 @@
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 FTP extends Storage{}
- return;
-}else{
- class FTP extends Storage {
- private $config;
+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\Files\Storage\FTP($this->config['ftp']);
+ public function setUp() {
+ $id = uniqid();
+ $this->config = include('files_external/tests/config.php');
+ if (!is_array($this->config) or !isset($this->config['ftp']) or !$this->config['ftp']['run']) {
+ $this->markTestSkipped('FTP backend not configured');
}
+ $this->config['ftp']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
+ $this->instance = new \OC\Files\Storage\FTP($this->config['ftp']);
+ }
- public function tearDown() {
+ public function tearDown() {
+ if ($this->instance) {
\OCP\Files::rmdirr($this->instance->constructUrl(''));
}
}