fix: Pass over product name as capability

Signed-off-by: Julius Knorr <jus@bitgrid.net>
pull/53339/head
Julius Knorr 7 months ago committed by Ferdinand Thiessen
parent b95f96a85a
commit 9f12d68523
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
  1. 2
      apps/theming/lib/Capabilities.php
  2. 7
      apps/theming/tests/CapabilitiesTest.php

@ -41,6 +41,7 @@ class Capabilities implements IPublicCapability {
* @return array{
* theming: array{
* name: string,
* productName: string,
* url: string,
* slogan: string,
* color: string,
@ -94,6 +95,7 @@ class Capabilities implements IPublicCapability {
return [
'theming' => [
'name' => $this->theming->getName(),
'productName' => $this->theming->getProductName(),
'url' => $this->theming->getBaseUrl(),
'slogan' => $this->theming->getSlogan(),
'color' => $color,

@ -54,6 +54,7 @@ class CapabilitiesTest extends TestCase {
return [
['name', 'url', 'slogan', '#FFFFFF', '#000000', 'logo', 'background', '#fff', '#000', 'http://absolute/', true, [
'name' => 'name',
'productName' => 'name',
'url' => 'url',
'slogan' => 'slogan',
'color' => '#FFFFFF',
@ -71,6 +72,7 @@ class CapabilitiesTest extends TestCase {
]],
['name1', 'url2', 'slogan3', '#01e4a0', '#ffffff', 'logo5', 'background6', '#fff', '#000', 'http://localhost/', false, [
'name' => 'name1',
'productName' => 'name1',
'url' => 'url2',
'slogan' => 'slogan3',
'color' => '#01e4a0',
@ -88,6 +90,7 @@ class CapabilitiesTest extends TestCase {
]],
['name1', 'url2', 'slogan3', '#000000', '#ffffff', 'logo5', 'backgroundColor', '#000000', '#ffffff', 'http://localhost/', true, [
'name' => 'name1',
'productName' => 'name1',
'url' => 'url2',
'slogan' => 'slogan3',
'color' => '#000000',
@ -105,6 +108,7 @@ class CapabilitiesTest extends TestCase {
]],
['name1', 'url2', 'slogan3', '#000000', '#ffffff', 'logo5', 'backgroundColor', '#000000', '#ffffff', 'http://localhost/', false, [
'name' => 'name1',
'productName' => 'name1',
'url' => 'url2',
'slogan' => 'slogan3',
'color' => '#000000',
@ -134,6 +138,9 @@ class CapabilitiesTest extends TestCase {
$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);

Loading…
Cancel
Save