summaryrefslogtreecommitdiffstats
path: root/tests/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/util.php')
-rw-r--r--tests/lib/util.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/lib/util.php b/tests/lib/util.php
index c2bb99c3b2e..98257e4c602 100644
--- a/tests/lib/util.php
+++ b/tests/lib/util.php
@@ -303,6 +303,8 @@ class Test_Util extends PHPUnit_Framework_TestCase {
\OC::$WEBROOT = '';
Dummy_OC_App::setEnabledApps($enabledApps);
+ // need to set a user id to make sure enabled apps are read from cache
+ \OC_User::setUserId(uniqid());
\OCP\Config::setSystemValue('defaultapp', $defaultAppConfig);
$this->assertEquals('http://localhost/' . $expectedPath, \OC_Util::getDefaultPageUrl());
@@ -310,6 +312,7 @@ class Test_Util extends PHPUnit_Framework_TestCase {
\OC::$WEBROOT = $oldWebRoot;
Dummy_OC_App::restore();
\OCP\Config::setSystemValue('defaultapp', $oldDefaultApps);
+ \OC_User::setUserId(null);
}
function defaultAppsProvider() {