summaryrefslogtreecommitdiffstats
path: root/tests/lib/Template/JSCombinerTest.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-02-03 12:41:21 +0100
committerJulius Härtl <jus@bitgrid.net>2018-02-03 15:21:51 +0100
commitb87e5a0f2e158d7aad91ba8e58b246e3666f6cbf (patch)
treed3c06a29ae403ad2fc042c848931f32af77b8b16 /tests/lib/Template/JSCombinerTest.php
parent5460166ff5440e9750870470afbd861c65b2b41e (diff)
downloadnextcloud-server-b87e5a0f2e158d7aad91ba8e58b246e3666f6cbf.tar.gz
nextcloud-server-b87e5a0f2e158d7aad91ba8e58b246e3666f6cbf.zip
Move depsCache clearing to SCSSCacher/JSCombiner
Signed-off-by: Julius Härtl <jus@bitgrid.net>
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();
+ }
+
}