aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Template/CSSResourceLocatorTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Template/CSSResourceLocatorTest.php')
-rw-r--r--tests/lib/Template/CSSResourceLocatorTest.php42
1 files changed, 4 insertions, 38 deletions
diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php
index 4832b03fe9b..2ae37999b32 100644
--- a/tests/lib/Template/CSSResourceLocatorTest.php
+++ b/tests/lib/Template/CSSResourceLocatorTest.php
@@ -1,24 +1,8 @@
<?php
+
/**
- * @copyright Copyright (c) 2017 Kyle Fazzari <kyrofa@ubuntu.com>
- *
- * @author Kyle Fazzari <kyrofa@ubuntu.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Template;
@@ -27,8 +11,6 @@ use OC\AppConfig;
use OC\Files\AppData\AppData;
use OC\Files\AppData\Factory;
use OC\Template\CSSResourceLocator;
-use OC\Template\IconsCacher;
-use OC\Template\SCSSCacher;
use OCA\Theming\ThemingDefaults;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\IAppData;
@@ -50,8 +32,6 @@ class CSSResourceLocatorTest extends \Test\TestCase {
protected $cacheFactory;
/** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var IconsCacher|\PHPUnit\Framework\MockObject\MockObject */
- protected $iconsCacher;
/** @var ITimeFactory|\PHPUnit\Framework\MockObject\MockObject */
private $timeFactory;
/** @var AppConfig|\PHPUnit\Framework\MockObject\MockObject */
@@ -66,7 +46,6 @@ class CSSResourceLocatorTest extends \Test\TestCase {
$this->config = $this->createMock(IConfig::class);
$this->cacheFactory = $this->createMock(ICacheFactory::class);
$this->themingDefaults = $this->createMock(ThemingDefaults::class);
- $this->iconsCacher = $this->createMock(IconsCacher::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->appConfig = $this->createMock(AppConfig::class);
}
@@ -75,24 +54,11 @@ class CSSResourceLocatorTest extends \Test\TestCase {
/** @var Factory|\PHPUnit\Framework\MockObject\MockObject $factory */
$factory = $this->createMock(Factory::class);
$factory->method('get')->with('css')->willReturn($this->appData);
- $scssCacher = new SCSSCacher(
- $this->logger,
- $factory,
- $this->urlGenerator,
- $this->config,
- $this->themingDefaults,
- \OC::$SERVERROOT,
- $this->cacheFactory,
- $this->iconsCacher,
- $this->timeFactory,
- $this->appConfig
- );
return new CSSResourceLocator(
$this->logger,
'theme',
['core' => 'map'],
['3rd' => 'party'],
- $scssCacher
);
}
@@ -112,7 +78,7 @@ class CSSResourceLocatorTest extends \Test\TestCase {
return sha1(uniqid(mt_rand(), true));
}
- public function testFindWithAppPathSymlink() {
+ public function testFindWithAppPathSymlink(): void {
// First create new apps path, and a symlink to it
$apps_dirname = $this->randomString();
$new_apps_path = sys_get_temp_dir() . '/' . $apps_dirname;