aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/lib/Template/IconsCacherTest.php29
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/lib/Template/IconsCacherTest.php b/tests/lib/Template/IconsCacherTest.php
index 106f08d5fa8..d02f5b3f05f 100644
--- a/tests/lib/Template/IconsCacherTest.php
+++ b/tests/lib/Template/IconsCacherTest.php
@@ -80,7 +80,7 @@ class IconsCacherTest extends \Test\TestCase {
public function testGetIconsFromValidCss() {
$css = "
icon.test {
- --icon-test: url('/svg/core/actions/add/000');
+ --icon-test: url('/svg/core/actions/add/000?v=1');
background-image: var(--icon-test);
}
";
@@ -104,7 +104,7 @@ class IconsCacherTest extends \Test\TestCase {
public function testSetIconsFromValidCss() {
$css = "
icon.test {
- --icon-test: url('/svg/core/actions/add/000');
+ --icon-test: url('/svg/core/actions/add/000?v=1');
background-image: var(--icon-test);
}
";
@@ -124,4 +124,29 @@ class IconsCacherTest extends \Test\TestCase {
$this->assertEquals($expected, $actual);
}
+ public function testSetIconsFromValidCssMultipleTimes() {
+ $css = "
+ icon.test {
+ --icon-test: url('/svg/core/actions/add/000?v=1');
+ background-image: var(--icon-test);
+ }
+ ";
+ $expected = "
+ icon.test {
+
+ background-image: var(--icon-test);
+ }
+ ";
+
+ $iconsFile = $this->createMock(ISimpleFile::class);
+ $this->folder->expects($this->exactly(3))
+ ->method('getFile')
+ ->willReturn($iconsFile);
+
+ $actual = $this->iconsCacher->setIconsCss($css);
+ $actual = $this->iconsCacher->setIconsCss($actual);
+ $actual = $this->iconsCacher->setIconsCss($actual);
+ $this->assertEquals($expected, $actual);
+ }
+
} \ No newline at end of file