summaryrefslogtreecommitdiffstats
path: root/tests/lib/Template/JSCombinerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Template/JSCombinerTest.php')
-rw-r--r--tests/lib/Template/JSCombinerTest.php21
1 files changed, 21 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();
+ }
+
}