summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorJonas Meurer <jonas@freesources.org>2021-08-10 11:06:24 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-08-16 13:12:00 +0000
commit55fcffd11a02c3c9c75923e7912ee952bf348cab (patch)
treed78bf30d61d85edb6500b4f3db309764b84943b4 /tests/lib
parent57e20ed566136581756a80e07995bb25f72bbcf6 (diff)
downloadnextcloud-server-55fcffd11a02c3c9c75923e7912ee952bf348cab.tar.gz
nextcloud-server-55fcffd11a02c3c9c75923e7912ee952bf348cab.zip
Use IURLGenerator function to get value of `\OC::$WEBROOT` global
Signed-off-by: Jonas Meurer <jonas@freesources.org>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/UrlGeneratorTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php
index dd2eb2ddc63..761f4b42eea 100644
--- a/tests/lib/UrlGeneratorTest.php
+++ b/tests/lib/UrlGeneratorTest.php
@@ -179,6 +179,12 @@ class UrlGeneratorTest extends \Test\TestCase {
$this->assertEquals($expected, $actual);
}
+ public function testGetWebroot() {
+ \OC::$WEBROOT = '/nextcloud';
+ $actual = $this->urlGenerator->getWebroot();
+ $this->assertEquals(\OC::$WEBROOT, $actual);
+ }
+
/**
* @dataProvider provideOCSRoutes
*/