aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/UtilTest.php
diff options
context:
space:
mode:
authorDaniel Rudolf <github.com@daniel-rudolf.de>2021-06-30 16:16:05 +0200
committerDaniel Rudolf <github.com@daniel-rudolf.de>2021-06-30 16:20:57 +0200
commit12059eb65b5f72974aab05f81ded890ebd73daab (patch)
tree7da1e4baa80a27ccda958beeb8636aa3dc381102 /tests/lib/UtilTest.php
parent75f7287b5ed7251599fd6c67ff3ae319f6a3dfc2 (diff)
downloadnextcloud-server-12059eb65b5f72974aab05f81ded890ebd73daab.tar.gz
nextcloud-server-12059eb65b5f72974aab05f81ded890ebd73daab.zip
Add IUrlGenerator::linkToDefaultPageUrl()
Replaces the deprecated \OC_Util::getDefaultPageUrl() and makes this API public. Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
Diffstat (limited to 'tests/lib/UtilTest.php')
-rw-r--r--tests/lib/UtilTest.php30
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php
index e21a5323b1b..55b86f06955 100644
--- a/tests/lib/UtilTest.php
+++ b/tests/lib/UtilTest.php
@@ -229,36 +229,6 @@ class UtilTest extends \Test\TestCase {
];
}
- public function testGetDefaultPageUrlWithRedirectUrlWithoutFrontController() {
- putenv('front_controller_active=false');
- \OC::$server->getConfig()->deleteSystemValue('htaccess.IgnoreFrontController');
-
- $_REQUEST['redirect_url'] = 'myRedirectUrl.com';
- $this->assertSame('http://localhost'.\OC::$WEBROOT.'/myRedirectUrl.com', OC_Util::getDefaultPageUrl());
- }
-
- public function testGetDefaultPageUrlWithRedirectUrlRedirectBypassWithoutFrontController() {
- putenv('front_controller_active=false');
- \OC::$server->getConfig()->deleteSystemValue('htaccess.IgnoreFrontController');
-
- $_REQUEST['redirect_url'] = 'myRedirectUrl.com@foo.com:a';
- $this->assertSame('http://localhost'.\OC::$WEBROOT.'/index.php/apps/files/', OC_Util::getDefaultPageUrl());
- }
-
- public function testGetDefaultPageUrlWithRedirectUrlRedirectBypassWithFrontController() {
- putenv('front_controller_active=true');
- $_REQUEST['redirect_url'] = 'myRedirectUrl.com@foo.com:a';
- $this->assertSame('http://localhost'.\OC::$WEBROOT.'/apps/files/', OC_Util::getDefaultPageUrl());
- }
-
- public function testGetDefaultPageUrlWithRedirectUrlWithIgnoreFrontController() {
- putenv('front_controller_active=false');
- \OC::$server->getConfig()->setSystemValue('htaccess.IgnoreFrontController', true);
-
- $_REQUEST['redirect_url'] = 'myRedirectUrl.com@foo.com:a';
- $this->assertSame('http://localhost'.\OC::$WEBROOT.'/apps/files/', OC_Util::getDefaultPageUrl());
- }
-
/**
* Test needUpgrade() when the core version is increased
*/