summaryrefslogtreecommitdiffstats
path: root/tests/lib/Template
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Template')
-rw-r--r--tests/lib/Template/JSCombinerTest.php21
-rw-r--r--tests/lib/Template/SCSSCacherTest.php21
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php
index d6583d4a450..d5f7000e0a5 100644
--- a/tests/lib/Template/JSCombinerTest.php
+++ b/tests/lib/Template/JSCombinerTest.php
@@ -511,4 +511,25 @@ var b = \'world\';
$expected = [];
$this->assertEquals($expected, $this->jsCombiner->getContent($pathInfo['dirname'], $pathInfo['basename']));
}
+
+ public function testResetCache() {
+ $file = $this->createMock(ISimpleFile::class);
+ $file->expects($this->once())
+ ->method('delete');
+
+ $folder = $this->createMock(ISimpleFolder::class);
+ $folder->expects($this->once())
+ ->method('getDirectoryListing')
+ ->willReturn([$file]);
+
+ $this->depsCache->expects($this->once())
+ ->method('clear')
+ ->with('');
+ $this->appData->expects($this->once())
+ ->method('getDirectoryListing')
+ ->willReturn([$folder]);
+
+ $this->jsCombiner->resetCache();
+ }
+
}
diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php
index 7b5300b99a9..94d3d5a610e 100644
--- a/tests/lib/Template/SCSSCacherTest.php
+++ b/tests/lib/Template/SCSSCacherTest.php
@@ -445,4 +445,25 @@ class SCSSCacherTest extends \Test\TestCase {
$this->rrmdir($tmpDir.$path);
}
+ public function testResetCache() {
+ $file = $this->createMock(ISimpleFile::class);
+ $file->expects($this->once())
+ ->method('delete');
+
+ $folder = $this->createMock(ISimpleFolder::class);
+ $folder->expects($this->once())
+ ->method('getDirectoryListing')
+ ->willReturn([$file]);
+
+ $this->depsCache->expects($this->once())
+ ->method('clear')
+ ->with('');
+ $this->appData->expects($this->once())
+ ->method('getDirectoryListing')
+ ->willReturn([$folder]);
+
+ $this->scssCacher->resetCache();
+ }
+
+
}