Skip to content
Snippets Groups Projects
Unverified Commit 0fd77076 authored by Lukas Reschke's avatar Lukas Reschke
Browse files
parent d15fd5cb
No related branches found
No related tags found
No related merge requests found
...@@ -77,6 +77,10 @@ class Template extends \OC_Defaults { ...@@ -77,6 +77,10 @@ class Template extends \OC_Defaults {
return $this->config->getAppValue('theming', 'name', $this->name); return $this->config->getAppValue('theming', 'name', $this->name);
} }
public function getTitle() {
return $this->config->getAppValue('theming', 'name', $this->name);
}
public function getEntity() { public function getEntity() {
return $this->config->getAppValue('theming', 'name', $this->name); return $this->config->getAppValue('theming', 'name', $this->name);
} }
......
...@@ -91,6 +91,27 @@ class TemplateTest extends TestCase { ...@@ -91,6 +91,27 @@ class TemplateTest extends TestCase {
$this->assertEquals('MyCustomCloud', $this->template->getName()); $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() { public function testGetEntityWithDefault() {
$this->config $this->config
->expects($this->once()) ->expects($this->once())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment