diff options
Diffstat (limited to 'tests/lib/UtilTest.php')
-rw-r--r-- | tests/lib/UtilTest.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index 60e50f750ea..278e6cfd4ce 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -350,6 +350,7 @@ 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()); @@ -357,6 +358,7 @@ class UtilTest extends \Test\TestCase { 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()); @@ -368,6 +370,14 @@ class UtilTest extends \Test\TestCase { $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 */ |