diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-02-18 09:12:11 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-02-18 09:12:11 +0100 |
commit | a6b579b772a9966984d46daad82e46ac2905a343 (patch) | |
tree | 7f5bbe5f171de80614837617115718ddba3a0a35 /apps/theming/tests/ThemingDefaultsTest.php | |
parent | 1edfffd091ed416d99925d9dc660920560c457fa (diff) | |
download | nextcloud-server-a6b579b772a9966984d46daad82e46ac2905a343.tar.gz nextcloud-server-a6b579b772a9966984d46daad82e46ac2905a343.zip |
Add guest navigation type
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/tests/ThemingDefaultsTest.php')
-rw-r--r-- | apps/theming/tests/ThemingDefaultsTest.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index 68435dd148a..ea8ab6975ef 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -41,6 +41,7 @@ use OCP\ICache; use OCP\ICacheFactory; use OCP\IConfig; use OCP\IL10N; +use OCP\INavigationManager; use OCP\IURLGenerator; use Test\TestCase; @@ -67,6 +68,8 @@ class ThemingDefaultsTest extends TestCase { private $appManager; /** @var ImageManager|\PHPUnit_Framework_MockObject_MockObject */ private $imageManager; + /** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */ + private $navigationManager; public function setUp() { parent::setUp(); @@ -78,6 +81,7 @@ class ThemingDefaultsTest extends TestCase { $this->util = $this->createMock(Util::class); $this->imageManager = $this->createMock(ImageManager::class); $this->appManager = $this->createMock(IAppManager::class); + $this->navigationManager = $this->createMock(INavigationManager::class); $this->defaults = new \OC_Defaults(); $this->urlGenerator ->expects($this->any()) @@ -90,7 +94,8 @@ class ThemingDefaultsTest extends TestCase { $this->cacheFactory, $this->util, $this->imageManager, - $this->appManager + $this->appManager, + $this->navigationManager ); } @@ -266,6 +271,7 @@ class ThemingDefaultsTest extends TestCase { } public function testGetShortFooterEmptyUrl() { + $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) ->method('getAppValue') @@ -281,6 +287,7 @@ class ThemingDefaultsTest extends TestCase { } public function testGetShortFooterEmptySlogan() { + $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) ->method('getAppValue') @@ -296,6 +303,7 @@ class ThemingDefaultsTest extends TestCase { } public function testGetShortFooterImprint() { + $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) ->method('getAppValue') @@ -316,6 +324,7 @@ class ThemingDefaultsTest extends TestCase { } public function testGetShortFooterPrivacy() { + $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) ->method('getAppValue') @@ -336,6 +345,7 @@ class ThemingDefaultsTest extends TestCase { } public function testGetShortFooterAllLegalLinks() { + $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) ->method('getAppValue') @@ -367,6 +377,7 @@ class ThemingDefaultsTest extends TestCase { * @dataProvider invalidLegalUrlProvider */ public function testGetShortFooterInvalidImprint($invalidImprintUrl) { + $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) ->method('getAppValue') @@ -386,6 +397,7 @@ class ThemingDefaultsTest extends TestCase { * @dataProvider invalidLegalUrlProvider */ public function testGetShortFooterInvalidPrivacy($invalidPrivacyUrl) { + $this->navigationManager->expects($this->once())->method('getAll')->with(INavigationManager::TYPE_GUEST)->willReturn([]); $this->config ->expects($this->exactly(5)) ->method('getAppValue') |