mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix: Pass over product name as capability
Signed-off-by: Julius Knorr <jus@bitgrid.net>
This commit is contained in:
parent
b95f96a85a
commit
9f12d68523
2 changed files with 9 additions and 0 deletions
|
|
@ -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…
Reference in a new issue