diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php index b6145298d956b..c9bc98036f509 100644 --- a/apps/theming/lib/Capabilities.php +++ b/apps/theming/lib/Capabilities.php @@ -41,6 +41,7 @@ public function __construct( * @return array{ * theming: array{ * name: string, + * productName: string, * url: string, * slogan: string, * color: string, @@ -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, diff --git a/apps/theming/openapi.json b/apps/theming/openapi.json index 7ad7242d74469..d53159b06a9b1 100644 --- a/apps/theming/openapi.json +++ b/apps/theming/openapi.json @@ -79,6 +79,7 @@ "type": "object", "required": [ "name", + "productName", "url", "slogan", "color", @@ -98,6 +99,9 @@ "name": { "type": "string" }, + "productName": { + "type": "string" + }, "url": { "type": "string" }, diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php index 1274be929efb8..17f944a317fd0 100644 --- a/apps/theming/tests/CapabilitiesTest.php +++ b/apps/theming/tests/CapabilitiesTest.php @@ -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', @@ -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', @@ -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', @@ -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', @@ -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);