summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/UrlGeneratorTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php
index 340c9c7082d..0e50f4d92ec 100644
--- a/tests/lib/UrlGeneratorTest.php
+++ b/tests/lib/UrlGeneratorTest.php
@@ -162,4 +162,22 @@ class UrlGeneratorTest extends \Test\TestCase {
$this->assertEquals($expected, $actual);
}
+ /**
+ * @dataProvider provideOCSRoutes
+ */
+ public function testLinkToOCSRouteAbsolute(string $route, string $expected) {
+ $this->mockBaseUrl();
+ \OC::$WEBROOT = '/nextcloud';
+ $result = $this->urlGenerator->linkToOCSRouteAbsolute($route);
+ $this->assertEquals($expected, $result);
+ }
+
+ public function provideOCSRoutes() {
+ return [
+ ['core.OCS.getCapabilities', 'http://localhost/nextcloud/ocs/v2.php/cloud/capabilities'],
+ ['core.WhatsNew.dismiss', 'http://localhost/nextcloud/ocs/v2.php/core/whatsnew'],
+ ];
+ }
+
+
}