mirror of
https://github.com/nextcloud/server.git
synced 2026-04-28 01:28:08 -04:00
Merge pull request #371 from nextcloud/implement-get-title
Implement "getTitle"
This commit is contained in:
commit
77071d07cf
2 changed files with 25 additions and 0 deletions
|
|
@ -77,6 +77,10 @@ class Template extends \OC_Defaults {
|
|||
return $this->config->getAppValue('theming', 'name', $this->name);
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
return $this->config->getAppValue('theming', 'name', $this->name);
|
||||
}
|
||||
|
||||
public function getEntity() {
|
||||
return $this->config->getAppValue('theming', 'name', $this->name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,27 @@ class TemplateTest extends TestCase {
|
|||
$this->assertEquals('MyCustomCloud', $this->template->getName());
|
||||
}
|
||||
|
||||
public function testGetTitleWithDefault() {
|
||||
$this->config
|
||||
->expects($this->once())
|
||||
->method('getAppValue')
|
||||
->with('theming', 'name', 'Nextcloud')
|
||||
->willReturn('Nextcloud');
|
||||
|
||||
$this->assertEquals('Nextcloud', $this->template->getTitle());
|
||||
}
|
||||
|
||||
public function testGetTitleWithCustom() {
|
||||
$this->config
|
||||
->expects($this->once())
|
||||
->method('getAppValue')
|
||||
->with('theming', 'name', 'Nextcloud')
|
||||
->willReturn('MyCustomCloud');
|
||||
|
||||
$this->assertEquals('MyCustomCloud', $this->template->getTitle());
|
||||
}
|
||||
|
||||
|
||||
public function testGetEntityWithDefault() {
|
||||
$this->config
|
||||
->expects($this->once())
|
||||
|
|
|
|||
Loading…
Reference in a new issue