Skip to content

Commit 21cc315

Browse files
committed
fix: Pass over product name as capability
Signed-off-by: Julius Knorr <jus@bitgrid.net>
1 parent 0359b7c commit 21cc315

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

apps/theming/lib/Capabilities.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public function getCapabilities() {
9494
return [
9595
'theming' => [
9696
'name' => $this->theming->getName(),
97+
'productName' => $this->theming->getProductName(),
9798
'url' => $this->theming->getBaseUrl(),
9899
'slogan' => $this->theming->getSlogan(),
99100
'color' => $color,

apps/theming/tests/CapabilitiesTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public static function dataGetCapabilities(): array {
5454
return [
5555
['name', 'url', 'slogan', '#FFFFFF', '#000000', 'logo', 'background', '#fff', '#000', 'http://absolute/', true, [
5656
'name' => 'name',
57+
'productName' => 'name',
5758
'url' => 'url',
5859
'slogan' => 'slogan',
5960
'color' => '#FFFFFF',
@@ -71,6 +72,7 @@ public static function dataGetCapabilities(): array {
7172
]],
7273
['name1', 'url2', 'slogan3', '#01e4a0', '#ffffff', 'logo5', 'background6', '#fff', '#000', 'http://localhost/', false, [
7374
'name' => 'name1',
75+
'productName' => 'name1',
7476
'url' => 'url2',
7577
'slogan' => 'slogan3',
7678
'color' => '#01e4a0',
@@ -88,6 +90,7 @@ public static function dataGetCapabilities(): array {
8890
]],
8991
['name1', 'url2', 'slogan3', '#000000', '#ffffff', 'logo5', 'backgroundColor', '#000000', '#ffffff', 'http://localhost/', true, [
9092
'name' => 'name1',
93+
'productName' => 'name1',
9194
'url' => 'url2',
9295
'slogan' => 'slogan3',
9396
'color' => '#000000',
@@ -105,6 +108,7 @@ public static function dataGetCapabilities(): array {
105108
]],
106109
['name1', 'url2', 'slogan3', '#000000', '#ffffff', 'logo5', 'backgroundColor', '#000000', '#ffffff', 'http://localhost/', false, [
107110
'name' => 'name1',
111+
'productName' => 'name1',
108112
'url' => 'url2',
109113
'slogan' => 'slogan3',
110114
'color' => '#000000',
@@ -134,6 +138,9 @@ public function testGetCapabilities(string $name, string $url, string $slogan, s
134138
$this->theming->expects($this->once())
135139
->method('getName')
136140
->willReturn($name);
141+
$this->theming->expects($this->once())
142+
->method('getProductName')
143+
->willReturn($name);
137144
$this->theming->expects($this->once())
138145
->method('getBaseUrl')
139146
->willReturn($url);

0 commit comments

Comments
 (0)