Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/UrlGeneratorTest.php')
-rw-r--r--tests/lib/UrlGeneratorTest.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php
index 9e5795fc41e..7fdbb7fb37e 100644
--- a/tests/lib/UrlGeneratorTest.php
+++ b/tests/lib/UrlGeneratorTest.php
@@ -297,7 +297,7 @@ class UrlGeneratorTest extends \Test\TestCase {
$this->assertEquals('http://localhost' . \OC::$WEBROOT . $expectedPath, $this->urlGenerator->linkToDefaultPageUrl());
}
- public function provideDefaultApps() {
+ public function provideDefaultApps(): array {
return [
// none specified, default to files
[
@@ -321,4 +321,18 @@ class UrlGeneratorTest extends \Test\TestCase {
],
];
}
+
+ public function imagePathProvider(): array {
+ return [
+ ['core', 'favicon-mask.svg', \OC::$WEBROOT . '/core/img/favicon-mask.svg'],
+ ['files', 'external.svg', \OC::$WEBROOT . '/apps/files/img/external.svg'],
+ ];
+ }
+
+ /**
+ * @dataProvider imagePathProvider
+ */
+ public function testImagePath(string $appName, string $file, string $result): void {
+ $this->assertSame($result, $this->urlGenerator->imagePath($appName, $file));
+ }
}