aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-04-07 15:42:43 -0500
committerMorris Jobke <hey@morrisjobke.de>2017-04-09 21:43:01 -0500
commit5b4adf66e51e21b3ecbd683397a362b60f792a50 (patch)
tree8bdc129ac9fd6575ee41be438ff667e49f7110a2 /apps/theming
parentca9d25169dcdd2923a356e2a797d8704506a3787 (diff)
downloadnextcloud-server-5b4adf66e51e21b3ecbd683397a362b60f792a50.tar.gz
nextcloud-server-5b4adf66e51e21b3ecbd683397a362b60f792a50.zip
Move OC_Defaults to OCP\Defaults
* currently there are two ways to access default values: OCP\Defaults or OC_Defaults (which is extended by OCA\Theming\ThemingDefaults) * our code used a mixture of both of them, which made it hard to work on theme values * this extended the public interface with the missing methods and uses them everywhere to only rely on the public interface Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/lib/Controller/IconController.php8
-rw-r--r--apps/theming/tests/Controller/IconControllerTest.php6
2 files changed, 7 insertions, 7 deletions
diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php
index 7c4e209d0df..ddd1240fab8 100644
--- a/apps/theming/lib/Controller/IconController.php
+++ b/apps/theming/lib/Controller/IconController.php
@@ -24,19 +24,19 @@ namespace OCA\Theming\Controller;
use OCA\Theming\IconBuilder;
use OCA\Theming\ImageManager;
-use OCA\Theming\ThemingDefaults;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\NotFoundResponse;
use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\Defaults;
use OCP\Files\NotFoundException;
use OCP\IRequest;
use OCA\Theming\Util;
use OCP\IConfig;
class IconController extends Controller {
- /** @var ThemingDefaults */
+ /** @var Defaults */
private $themingDefaults;
/** @var Util */
private $util;
@@ -54,7 +54,7 @@ class IconController extends Controller {
*
* @param string $appName
* @param IRequest $request
- * @param ThemingDefaults $themingDefaults
+ * @param Defaults $themingDefaults
* @param Util $util
* @param ITimeFactory $timeFactory
* @param IConfig $config
@@ -64,7 +64,7 @@ class IconController extends Controller {
public function __construct(
$appName,
IRequest $request,
- ThemingDefaults $themingDefaults,
+ Defaults $themingDefaults,
Util $util,
ITimeFactory $timeFactory,
IConfig $config,
diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php
index 591c1075492..ce053ff0eab 100644
--- a/apps/theming/tests/Controller/IconControllerTest.php
+++ b/apps/theming/tests/Controller/IconControllerTest.php
@@ -26,8 +26,8 @@ namespace OCA\Theming\Tests\Controller;
use OC\Files\SimpleFS\SimpleFile;
use OCA\Theming\ImageManager;
use OCP\AppFramework\Http;
-use OCP\AppFramework\Http\DataDisplayResponse;
use OCP\AppFramework\Http\NotFoundResponse;
+use OCP\Defaults;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\IConfig;
@@ -41,7 +41,7 @@ use OCP\AppFramework\Http\FileDisplayResponse;
class IconControllerTest extends TestCase {
/** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
private $request;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
private $themingDefaults;
/** @var Util */
private $util;
@@ -58,7 +58,7 @@ class IconControllerTest extends TestCase {
public function setUp() {
$this->request = $this->getMockBuilder('OCP\IRequest')->getMock();
- $this->themingDefaults = $this->getMockBuilder('OCA\Theming\ThemingDefaults')
+ $this->themingDefaults = $this->getMockBuilder('OCP\Defaults')
->disableOriginalConstructor()->getMock();
$this->util = $this->getMockBuilder('\OCA\Theming\Util')->disableOriginalConstructor()
->setMethods(['getAppImage', 'getAppIcon', 'elementColor'])->getMock();