diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-07 17:18:56 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-07 17:18:56 +0100 |
commit | 961ff01a93dd69cb12196a1b8507cce925e74fbc (patch) | |
tree | 4956c9a42d6286b0851ca73641439e5c002f6a9a /apps/files_external/tests | |
parent | 4b940955ddb3266f625eae83da412a655efef319 (diff) | |
parent | 5cad2d7ccc3d2b4ccd9e1b090e28787f1c28b6ca (diff) | |
download | nextcloud-server-961ff01a93dd69cb12196a1b8507cce925e74fbc.tar.gz nextcloud-server-961ff01a93dd69cb12196a1b8507cce925e74fbc.zip |
merge master into filesystem
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r-- | apps/files_external/tests/ftp.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php index 3e6208e4a0d..970c83b0bca 100644 --- a/apps/files_external/tests/ftp.php +++ b/apps/files_external/tests/ftp.php @@ -26,4 +26,22 @@ class FTP extends Storage { \OCP\Files::rmdirr($this->instance->constructUrl('')); } } + + public function testConstructUrl(){ + $config = array ( 'host' => 'localhost', 'user' => 'ftp', 'password' => 'ftp', 'root' => '/', 'secure' => false ); + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = true; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = 'false'; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftp://ftp:ftp@localhost/', $instance->constructUrl('')); + + $config['secure'] = 'true'; + $instance = new OC_Filestorage_FTP($config); + $this->assertEqual('ftps://ftp:ftp@localhost/', $instance->constructUrl('')); + } } |