aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Template
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-10-15 15:59:21 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-10-16 13:28:00 +0200
commitcce716f9f3ed53874d2f88f187ec77c442d0a609 (patch)
tree61daf8fbc3cd11b212b62ea88310f9ad1ace1a3a /tests/lib/Template
parent2456969b4121196f7578518a8f1bf5314bb21fc9 (diff)
downloadnextcloud-server-cce716f9f3ed53874d2f88f187ec77c442d0a609.tar.gz
nextcloud-server-cce716f9f3ed53874d2f88f187ec77c442d0a609.zip
Clear cached app config while waiting for the SCSSCache to finish processing the file
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/Template')
-rw-r--r--tests/lib/Template/CSSResourceLocatorTest.php7
-rw-r--r--tests/lib/Template/SCSSCacherTest.php8
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php
index 3f377f9daa4..3a66d738f25 100644
--- a/tests/lib/Template/CSSResourceLocatorTest.php
+++ b/tests/lib/Template/CSSResourceLocatorTest.php
@@ -23,6 +23,7 @@
namespace Test\Template;
+use OC\AppConfig;
use OC\Files\AppData\AppData;
use OC\Files\AppData\Factory;
use OC\Template\CSSResourceLocator;
@@ -53,6 +54,8 @@ class CSSResourceLocatorTest extends \Test\TestCase {
protected $iconsCacher;
/** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
+ /** @var AppConfig|\PHPUnit\Framework\MockObject\MockObject */
+ private $appConfig;
protected function setUp(): void {
parent::setUp();
@@ -65,6 +68,7 @@ class CSSResourceLocatorTest extends \Test\TestCase {
$this->themingDefaults = $this->createMock(ThemingDefaults::class);
$this->iconsCacher = $this->createMock(IconsCacher::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
+ $this->appConfig = $this->createMock(AppConfig::class);
}
private function cssResourceLocator() {
@@ -80,7 +84,8 @@ class CSSResourceLocatorTest extends \Test\TestCase {
\OC::$SERVERROOT,
$this->cacheFactory,
$this->iconsCacher,
- $this->timeFactory
+ $this->timeFactory,
+ $this->appConfig
);
return new CSSResourceLocator(
$this->logger,
diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php
index 1a77f789afe..77a9bdde764 100644
--- a/tests/lib/Template/SCSSCacherTest.php
+++ b/tests/lib/Template/SCSSCacherTest.php
@@ -23,6 +23,7 @@
namespace Test\Template;
+use OC\AppConfig;
use OC\Files\AppData\AppData;
use OC\Files\AppData\Factory;
use OC\Template\IconsCacher;
@@ -60,6 +61,8 @@ class SCSSCacherTest extends \Test\TestCase {
protected $iconsCacher;
/** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $timeFactory;
+ /** @var AppConfig|\PHPUnit\Framework\MockObject\MockObject */
+ protected $appConfig;
protected function setUp(): void {
parent::setUp();
@@ -92,6 +95,8 @@ class SCSSCacherTest extends \Test\TestCase {
->method('getCachedCSS')
->willReturn($iconsFile);
+ $this->appConfig = $this->createMock(AppConfig::class);
+
$this->scssCacher = new SCSSCacher(
$this->logger,
$factory,
@@ -101,7 +106,8 @@ class SCSSCacherTest extends \Test\TestCase {
\OC::$SERVERROOT,
$this->cacheFactory,
$this->iconsCacher,
- $this->timeFactory
+ $this->timeFactory,
+ $this->appConfig
);
}