diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-11-18 21:42:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-18 21:42:56 +0100 |
commit | 8ec2e34576e84b256ee671f805a319ff27f3f944 (patch) | |
tree | 2166e9fdd683f8e9b82cea7419b679323fad44a6 /tests | |
parent | 4458e294bc6530ef226ead91bd6cb9f753697f32 (diff) | |
parent | 1614b310ef0e4871dc5f21630e887010e0fb22bc (diff) | |
download | nextcloud-server-8ec2e34576e84b256ee671f805a319ff27f3f944.tar.gz nextcloud-server-8ec2e34576e84b256ee671f805a319ff27f3f944.zip |
Merge pull request #1602 from nextcloud/ignore-mod-env
Add system config htaccess.IgnoreFrontController for prettyURLs w/o mod_env
Diffstat (limited to 'tests')
-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 */ |