summaryrefslogtreecommitdiffstats
path: root/apps/theming/tests/CapabilitiesTest.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-15 21:27:28 +0200
committerGitHub <noreply@github.com>2017-08-15 21:27:28 +0200
commit8c97218b95ce43f393d7100b6df8c18aa5d4f1c4 (patch)
tree6799e5a9153adb641f84ea30f19865176178c18e /apps/theming/tests/CapabilitiesTest.php
parent60a485b80db9290df089d35b3fe73ad128371d7d (diff)
parentb7b4cfd6a14775ba9f4c71d7f3bc787971acf70f (diff)
downloadnextcloud-server-8c97218b95ce43f393d7100b6df8c18aa5d4f1c4.tar.gz
nextcloud-server-8c97218b95ce43f393d7100b6df8c18aa5d4f1c4.zip
Merge pull request #6128 from nextcloud/primary-font-color-in-capabilities
Add the primary font color to the capabilities as well
Diffstat (limited to 'apps/theming/tests/CapabilitiesTest.php')
-rw-r--r--apps/theming/tests/CapabilitiesTest.php23
1 files changed, 15 insertions, 8 deletions
diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php
index 55f40cb788a..8ab7f6e2c7f 100644
--- a/apps/theming/tests/CapabilitiesTest.php
+++ b/apps/theming/tests/CapabilitiesTest.php
@@ -23,6 +23,9 @@ namespace OCA\Theming\Tests;
use OCA\Theming\Capabilities;
use OCA\Theming\ThemingDefaults;
+use OCA\Theming\Util;
+use OCP\App\IAppManager;
+use OCP\Files\IAppData;
use OCP\IConfig;
use OCP\IURLGenerator;
use Test\TestCase;
@@ -52,34 +55,38 @@ class CapabilitiesTest extends TestCase {
$this->theming = $this->createMock(ThemingDefaults::class);
$this->url = $this->getMockBuilder(IURLGenerator::class)->getMock();
$this->config = $this->createMock(IConfig::class);
- $this->capabilities = new Capabilities($this->theming, $this->url, $this->config);
+ $util = new Util($this->config, $this->createMock(IAppManager::class), $this->createMock(IAppData::class));
+ $this->capabilities = new Capabilities($this->theming, $util, $this->url, $this->config);
}
public function dataGetCapabilities() {
return [
- ['name', 'url', 'slogan', 'color', 'logo', 'background', 'http://absolute/', [
+ ['name', 'url', 'slogan', '#FFFFFF', 'logo', 'background', 'http://absolute/', [
'name' => 'name',
'url' => 'url',
'slogan' => 'slogan',
- 'color' => 'color',
+ 'color' => '#FFFFFF',
+ 'color-text' => '#000000',
'logo' => 'http://absolute/logo',
'background' => 'http://absolute/background',
]],
- ['name1', 'url2', 'slogan3', 'color4', 'logo5', 'background6', 'http://localhost/', [
+ ['name1', 'url2', 'slogan3', '#01e4a0', 'logo5', 'background6', 'http://localhost/', [
'name' => 'name1',
'url' => 'url2',
'slogan' => 'slogan3',
- 'color' => 'color4',
+ 'color' => '#01e4a0',
+ 'color-text' => '#FFFFFF',
'logo' => 'http://localhost/logo5',
'background' => 'http://localhost/background6',
]],
- ['name1', 'url2', 'slogan3', 'color4', 'logo5', 'backgroundColor', 'http://localhost/', [
+ ['name1', 'url2', 'slogan3', '#000000', 'logo5', 'backgroundColor', 'http://localhost/', [
'name' => 'name1',
'url' => 'url2',
'slogan' => 'slogan3',
- 'color' => 'color4',
+ 'color' => '#000000',
+ 'color-text' => '#FFFFFF',
'logo' => 'http://localhost/logo5',
- 'background' => 'color4',
+ 'background' => '#000000',
]],
];
}