diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-18 14:49:55 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-18 14:49:55 +0100 |
commit | 50e877330700117ace281236ce7ecc1ae0f9521b (patch) | |
tree | 5ae40fa7903eb2ea05962d87032704b3150316f1 /tests | |
parent | 22d1b1285e970447f532919368ebffeeb8c2ebf7 (diff) | |
parent | 450e2f3bd308388e5df01b2b2ea38e6bf16b1c67 (diff) | |
download | nextcloud-server-50e877330700117ace281236ce7ecc1ae0f9521b.tar.gz nextcloud-server-50e877330700117ace281236ce7ecc1ae0f9521b.zip |
Merge pull request #21280 from owncloud/drop-unused-methods
OC_Helper::makeURLAbsolute is not used anymore
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/helper.php | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/tests/lib/helper.php b/tests/lib/helper.php index 9ad3af3d60c..dbc89b716d0 100644 --- a/tests/lib/helper.php +++ b/tests/lib/helper.php @@ -245,126 +245,6 @@ class Test_Helper extends \Test\TestCase { /** * @small - * test absolute URL construction - * @dataProvider provideDocRootURLs - */ - function testMakeAbsoluteURLDocRoot($url, $expectedResult) { - \OC::$WEBROOT = ''; - $result = \OC_Helper::makeURLAbsolute($url); - - $this->assertEquals($expectedResult, $result); - } - - /** - * @small - * test absolute URL construction - * @dataProvider provideSubDirURLs - */ - function testMakeAbsoluteURLSubDir($url, $expectedResult) { - \OC::$WEBROOT = '/owncloud'; - $result = \OC_Helper::makeURLAbsolute($url); - - $this->assertEquals($expectedResult, $result); - } - - public function provideDocRootURLs() { - return array( - array('index.php', 'http://localhost/index.php'), - array('/index.php', 'http://localhost/index.php'), - array('/apps/index.php', 'http://localhost/apps/index.php'), - array('apps/index.php', 'http://localhost/apps/index.php'), - ); - } - - public function provideSubDirURLs() { - return array( - array('index.php', 'http://localhost/owncloud/index.php'), - array('/index.php', 'http://localhost/owncloud/index.php'), - array('/apps/index.php', 'http://localhost/owncloud/apps/index.php'), - array('apps/index.php', 'http://localhost/owncloud/apps/index.php'), - ); - } - - /** - * @small - * test linkToAbsolute URL construction - * @dataProvider provideDocRootAppAbsoluteUrlParts - */ - public function testLinkToAbsoluteDocRoot($app, $file, $args, $expectedResult) { - \OC::$WEBROOT = ''; - $result = \OC_Helper::linkToAbsolute($app, $file, $args); - - $this->assertEquals($expectedResult, $result); - } - - /** - * @small - * test linkToAbsolute URL construction in sub directory - * @dataProvider provideSubDirAppAbsoluteUrlParts - */ - public function testLinkToAbsoluteSubDir($app, $file, $args, $expectedResult) { - \OC::$WEBROOT = '/owncloud'; - $result = \OC_Helper::linkToAbsolute($app, $file, $args); - - $this->assertEquals($expectedResult, $result); - } - - /** - * @return array - */ - public function provideDocRootAppAbsoluteUrlParts() { - return array( - array('files', 'ajax/list.php', array(), 'http://localhost/index.php/apps/files/ajax/list.php'), - array('files', 'ajax/list.php', array('trut' => 'trat', 'dut' => 'dat'), 'http://localhost/index.php/apps/files/ajax/list.php?trut=trat&dut=dat'), - array('', 'index.php', array('trut' => 'trat', 'dut' => 'dat'), 'http://localhost/index.php?trut=trat&dut=dat'), - ); - } - - /** - * @return array - */ - public function provideSubDirAppAbsoluteUrlParts() { - return array( - array('files', 'ajax/list.php', array(), 'http://localhost/owncloud/index.php/apps/files/ajax/list.php'), - array('files', 'ajax/list.php', array('trut' => 'trat', 'dut' => 'dat'), 'http://localhost/owncloud/index.php/apps/files/ajax/list.php?trut=trat&dut=dat'), - array('', 'index.php', array('trut' => 'trat', 'dut' => 'dat'), 'http://localhost/owncloud/index.php?trut=trat&dut=dat'), - ); - } - - /** - * @small - * test linkToRemoteBase URL construction - */ - public function testLinkToRemoteBase() { - \OC::$WEBROOT = ''; - $result = \OC_Helper::linkToRemoteBase('webdav'); - $this->assertEquals('/remote.php/webdav', $result); - - \OC::$WEBROOT = '/owncloud'; - $result = \OC_Helper::linkToRemoteBase('webdav'); - $this->assertEquals('/owncloud/remote.php/webdav', $result); - } - - /** - * @small - * test linkToRemote URL construction - */ - public function testLinkToRemote() { - \OC::$WEBROOT = ''; - $result = \OC_Helper::linkToRemote('webdav'); - $this->assertEquals('http://localhost/remote.php/webdav/', $result); - $result = \OC_Helper::linkToRemote('webdav', false); - $this->assertEquals('http://localhost/remote.php/webdav', $result); - - \OC::$WEBROOT = '/owncloud'; - $result = \OC_Helper::linkToRemote('webdav'); - $this->assertEquals('http://localhost/owncloud/remote.php/webdav/', $result); - $result = \OC_Helper::linkToRemote('webdav', false); - $this->assertEquals('http://localhost/owncloud/remote.php/webdav', $result); - } - - /** - * @small * test linkToPublic URL construction */ public function testLinkToPublic() { |