diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-10-11 19:01:59 +0200 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-11-03 09:36:08 +0100 |
commit | e69e201af81c777aa75c739d55f0c2fe3d53236f (patch) | |
tree | 1070cbfc0ea081b0a9bdba4bd840f1187f7796b0 /apps/theming/tests | |
parent | ba93afbddd4930408129e863957fd7b631582ae2 (diff) | |
download | nextcloud-server-e69e201af81c777aa75c739d55f0c2fe3d53236f.tar.gz nextcloud-server-e69e201af81c777aa75c739d55f0c2fe3d53236f.zip |
fix(theming): Correctly expose user and admin theming
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/theming/tests')
-rw-r--r-- | apps/theming/tests/CapabilitiesTest.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php index 1a2d01d69d1..932cbe4a111 100644 --- a/apps/theming/tests/CapabilitiesTest.php +++ b/apps/theming/tests/CapabilitiesTest.php @@ -36,6 +36,7 @@ use OCP\App\IAppManager; use OCP\Files\IAppData; use OCP\IConfig; use OCP\IURLGenerator; +use OCP\IUserSession; use Test\TestCase; /** @@ -56,6 +57,8 @@ class CapabilitiesTest extends TestCase { /** @var Util|\PHPUnit\Framework\MockObject\MockObject */ protected $util; + protected IUserSession $userSession; + /** @var Capabilities */ protected $capabilities; @@ -66,7 +69,8 @@ class CapabilitiesTest extends TestCase { $this->url = $this->getMockBuilder(IURLGenerator::class)->getMock(); $this->config = $this->createMock(IConfig::class); $this->util = $this->createMock(Util::class); - $this->capabilities = new Capabilities($this->theming, $this->util, $this->url, $this->config); + $this->userSession = $this->createMock(IUserSession::class); + $this->capabilities = new Capabilities($this->theming, $this->util, $this->url, $this->config, $this->userSession); } public function dataGetCapabilities() { @@ -165,13 +169,13 @@ class CapabilitiesTest extends TestCase { ->method('getSlogan') ->willReturn($slogan); $this->theming->expects($this->atLeast(1)) - ->method('getColorPrimary') + ->method('getDefaultColorPrimary') ->willReturn($color); $this->theming->expects($this->exactly(3)) ->method('getLogo') ->willReturn($logo); $this->theming->expects($this->once()) - ->method('getTextColorPrimary') + ->method('getDefaultTextColorPrimary') ->willReturn($textColor); $util = new Util($this->config, $this->createMock(IAppManager::class), $this->createMock(IAppData::class), $this->createMock(ImageManager::class)); |