summaryrefslogtreecommitdiffstats
path: root/apps/theming/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-01-24 10:56:31 -0600
committerGitHub <noreply@github.com>2017-01-24 10:56:31 -0600
commite09bba5e366d14223c1326ac4a08cf3e5904612a (patch)
tree824ddc7166e002b46bea6f1cff916785603c2494 /apps/theming/tests
parentf55260bc83feeb76ae662c7b97d092da83d8b6bb (diff)
parent38f684aadfb10d491fabfeb0af9a22c109c9cfff (diff)
downloadnextcloud-server-e09bba5e366d14223c1326ac4a08cf3e5904612a.tar.gz
nextcloud-server-e09bba5e366d14223c1326ac4a08cf3e5904612a.zip
Merge pull request #3151 from nextcloud/navigation-icons
add icons to navigation of personal & admin settings
Diffstat (limited to 'apps/theming/tests')
-rw-r--r--apps/theming/tests/Settings/SectionTest.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/theming/tests/Settings/SectionTest.php b/apps/theming/tests/Settings/SectionTest.php
index 3a3a4375236..90d1854aebf 100644
--- a/apps/theming/tests/Settings/SectionTest.php
+++ b/apps/theming/tests/Settings/SectionTest.php
@@ -25,19 +25,24 @@ namespace OCA\Theming\Tests\Settings;
use OCA\Theming\Settings\Section;
use OCP\IL10N;
+use OCP\IURLGenerator;
use Test\TestCase;
class SectionTest extends TestCase {
- /** @var IL10N */
+ /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ private $url;
+ /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
private $l;
/** @var Section */
private $section;
public function setUp() {
parent::setUp();
- $this->l = $this->getMockBuilder('\OCP\IL10N')->getMock();
+ $this->url = $this->createMock(IURLGenerator::class);
+ $this->l = $this->createMock(IL10N::class);
$this->section = new Section(
+ $this->url,
$this->l
);
}
@@ -59,4 +64,13 @@ class SectionTest extends TestCase {
public function testGetPriority() {
$this->assertSame(30, $this->section->getPriority());
}
+
+ public function testGetIcon() {
+ $this->url->expects($this->once())
+ ->method('imagePath')
+ ->with('theming', 'app-dark.svg')
+ ->willReturn('icon');
+
+ $this->assertSame('icon', $this->section->getIcon());
+ }
}