summaryrefslogtreecommitdiffstats
path: root/tests/lib/Template
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-07-24 17:30:39 +0200
committerRobin Appelman <robin@icewind.nl>2018-07-24 17:30:39 +0200
commit6686ca9b2a222bc972252d86e39c7a0ced62f158 (patch)
tree8d90a043473b68b03e7aa3ab7a40238127a05544 /tests/lib/Template
parent7da815bb0403ebb072866b61779a84835b9a74b8 (diff)
downloadnextcloud-server-6686ca9b2a222bc972252d86e39c7a0ced62f158.tar.gz
nextcloud-server-6686ca9b2a222bc972252d86e39c7a0ced62f158.zip
cache isCached state for scss resources
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Template')
-rw-r--r--tests/lib/Template/CSSResourceLocatorTest.php7
-rw-r--r--tests/lib/Template/SCSSCacherTest.php7
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php
index 3fb7972b211..a928f043ed3 100644
--- a/tests/lib/Template/CSSResourceLocatorTest.php
+++ b/tests/lib/Template/CSSResourceLocatorTest.php
@@ -25,6 +25,7 @@ namespace Test\Template;
use OC\Files\AppData\AppData;
use OC\Files\AppData\Factory;
+use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\IAppData;
use OCP\ICacheFactory;
use OCP\ILogger;
@@ -50,6 +51,8 @@ class CSSResourceLocatorTest extends \Test\TestCase {
protected $logger;
/** @var IconsCacher|\PHPUnit_Framework_MockObject_MockObject */
protected $iconsCacher;
+ /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ private $timeFactory;
protected function setUp() {
parent::setUp();
@@ -61,6 +64,7 @@ class CSSResourceLocatorTest extends \Test\TestCase {
$this->cacheFactory = $this->createMock(ICacheFactory::class);
$this->themingDefaults = $this->createMock(ThemingDefaults::class);
$this->iconsCacher = $this->createMock(IconsCacher::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
}
private function cssResourceLocator() {
@@ -75,7 +79,8 @@ class CSSResourceLocatorTest extends \Test\TestCase {
$this->themingDefaults,
\OC::$SERVERROOT,
$this->cacheFactory,
- $this->iconsCacher
+ $this->iconsCacher,
+ $this->timeFactory
);
return new CSSResourceLocator(
$this->logger,
diff --git a/tests/lib/Template/SCSSCacherTest.php b/tests/lib/Template/SCSSCacherTest.php
index f32b87edcbb..149222f6b8e 100644
--- a/tests/lib/Template/SCSSCacherTest.php
+++ b/tests/lib/Template/SCSSCacherTest.php
@@ -28,6 +28,7 @@ use OC\Files\AppData\Factory;
use OC\Template\SCSSCacher;
use OC\Template\IconsCacher;
use OCA\Theming\ThemingDefaults;
+use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\IAppData;
use OCP\Files\NotFoundException;
use OCP\Files\SimpleFS\ISimpleFile;
@@ -58,12 +59,15 @@ class SCSSCacherTest extends \Test\TestCase {
protected $cacheFactory;
/** @var IconsCacher|\PHPUnit_Framework_MockObject_MockObject */
protected $iconsCacher;
+ /** @var ITimeFactory|\PHPUnit_Framework_MockObject_MockObject */
+ protected $timeFactory;
protected function setUp() {
parent::setUp();
$this->logger = $this->createMock(ILogger::class);
$this->appData = $this->createMock(AppData::class);
$this->iconsCacher = $this->createMock(IconsCacher::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
/** @var Factory|\PHPUnit_Framework_MockObject_MockObject $factory */
$factory = $this->createMock(Factory::class);
@@ -97,7 +101,8 @@ class SCSSCacherTest extends \Test\TestCase {
$this->themingDefaults,
\OC::$SERVERROOT,
$this->cacheFactory,
- $this->iconsCacher
+ $this->iconsCacher,
+ $this->timeFactory
);
}