Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-11-30 15:06:10 +0300
committerJulius Härtl <jus@bitgrid.net>2020-11-30 16:15:17 +0300
commit22e26a7f5eebb686ee4d923f4e4fbbd3d8c08b2b (patch)
treebde363ddb60daf8aaabd95ad492a2a9ce35ce903 /apps/theming/tests/ThemingDefaultsTest.php
parent7718a8a4b81628b600ddafbf170ba34b41776f8e (diff)
Store scss variables under a different prefix for each theming config version
The main issue with using the general theming- prefix is that with APCu caching the cache is not shared between processes, so when trying to reset the cache through the CLI, e.g. when updating the theming config the old cache is never invalidated. Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/tests/ThemingDefaultsTest.php')
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index 341a1b24887..e34da50f5a6 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -634,9 +634,10 @@ class ThemingDefaultsTest extends TestCase {
}
public function testGetScssVariablesCached() {
+ $this->config->expects($this->any())->method('getAppValue')->with('theming', 'cachebuster', '0')->willReturn('1');
$this->cacheFactory->expects($this->once())
->method('createDistributed')
- ->with('theming-')
+ ->with('theming-1-')
->willReturn($this->cache);
$this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(['foo' => 'bar']);
$this->assertEquals(['foo' => 'bar'], $this->template->getScssVariables());
@@ -658,7 +659,7 @@ class ThemingDefaultsTest extends TestCase {
$this->util->expects($this->any())->method('elementColor')->with($this->defaults->getColorPrimary())->willReturn('#aaaaaa');
$this->cacheFactory->expects($this->once())
->method('createDistributed')
- ->with('theming-')
+ ->with('theming-0-')
->willReturn($this->cache);
$this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(null);
$this->imageManager->expects($this->at(0))->method('getImageUrl')->with('logo')->willReturn('custom-logo?v=0');