diff options
author | Joas Schilling <coding@schilljs.com> | 2016-07-11 21:57:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-11 21:57:52 +0200 |
commit | 77071d07cffd7b03d46929be81b60c3428644606 (patch) | |
tree | ea03fe300c78fd195b6e5c915375f9bc5673fc5a /apps/theming/tests | |
parent | e8169e0d719ef8932bf30b56aad3925782d171bd (diff) | |
parent | 0fd770765f86d0176ea288314f547ee0f3c33a0a (diff) | |
download | nextcloud-server-77071d07cffd7b03d46929be81b60c3428644606.tar.gz nextcloud-server-77071d07cffd7b03d46929be81b60c3428644606.zip |
Merge pull request #371 from nextcloud/implement-get-title
Implement "getTitle"
Diffstat (limited to 'apps/theming/tests')
-rw-r--r-- | apps/theming/tests/lib/TemplateTest.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/theming/tests/lib/TemplateTest.php b/apps/theming/tests/lib/TemplateTest.php index b9623e437b7..1ee860f93c4 100644 --- a/apps/theming/tests/lib/TemplateTest.php +++ b/apps/theming/tests/lib/TemplateTest.php @@ -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()) |