diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-02-03 12:41:21 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-02-03 15:21:51 +0100 |
commit | b87e5a0f2e158d7aad91ba8e58b246e3666f6cbf (patch) | |
tree | d3c06a29ae403ad2fc042c848931f32af77b8b16 /tests/lib/Template/JSCombinerTest.php | |
parent | 5460166ff5440e9750870470afbd861c65b2b41e (diff) | |
download | nextcloud-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.php | 21 |
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(); + } + } |