Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/theming/lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function __construct(
* @return array{
* theming: array{
* name: string,
* productName: string,
* url: string,
* slogan: string,
* color: string,
Expand Down Expand Up @@ -94,6 +95,7 @@ public function getCapabilities() {
return [
'theming' => [
'name' => $this->theming->getName(),
'productName' => $this->theming->getProductName(),
'url' => $this->theming->getBaseUrl(),
'slogan' => $this->theming->getSlogan(),
'color' => $color,
Expand Down
4 changes: 4 additions & 0 deletions apps/theming/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"type": "object",
"required": [
"name",
"productName",
"url",
"slogan",
"color",
Expand All @@ -98,6 +99,9 @@
"name": {
"type": "string"
},
"productName": {
"type": "string"
},
"url": {
"type": "string"
},
Expand Down
7 changes: 7 additions & 0 deletions apps/theming/tests/CapabilitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function dataGetCapabilities() {
return [
['name', 'url', 'slogan', '#FFFFFF', '#000000', 'logo', 'background', '#fff', '#000', 'http://absolute/', true, [
'name' => 'name',
'productName' => 'name',
'url' => 'url',
'slogan' => 'slogan',
'color' => '#FFFFFF',
Expand All @@ -79,6 +80,7 @@ public function dataGetCapabilities() {
]],
['name1', 'url2', 'slogan3', '#01e4a0', '#ffffff', 'logo5', 'background6', '#fff', '#000', 'http://localhost/', false, [
'name' => 'name1',
'productName' => 'name1',
'url' => 'url2',
'slogan' => 'slogan3',
'color' => '#01e4a0',
Expand All @@ -96,6 +98,7 @@ public function dataGetCapabilities() {
]],
['name1', 'url2', 'slogan3', '#000000', '#ffffff', 'logo5', 'backgroundColor', '#000000', '#ffffff', 'http://localhost/', true, [
'name' => 'name1',
'productName' => 'name1',
'url' => 'url2',
'slogan' => 'slogan3',
'color' => '#000000',
Expand All @@ -113,6 +116,7 @@ public function dataGetCapabilities() {
]],
['name1', 'url2', 'slogan3', '#000000', '#ffffff', 'logo5', 'backgroundColor', '#000000', '#ffffff', 'http://localhost/', false, [
'name' => 'name1',
'productName' => 'name1',
'url' => 'url2',
'slogan' => 'slogan3',
'color' => '#000000',
Expand Down Expand Up @@ -151,6 +155,9 @@ public function testGetCapabilities($name, $url, $slogan, $color, $textColor, $l
$this->theming->expects($this->once())
->method('getName')
->willReturn($name);
$this->theming->expects($this->once())
->method('getProductName')
->willReturn($name);
$this->theming->expects($this->once())
->method('getBaseUrl')
->willReturn($url);
Expand Down
Loading