Skip to content

Commit

Permalink
WIP4
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <szaimen@e.mail.de>
  • Loading branch information
szaimen committed Oct 31, 2023
1 parent 2a974aa commit 773fe16
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions apps/theming/tests/ThemingDefaultsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ class ThemingDefaultsTest extends TestCase {
private $imageManager;
/** @var INavigationManager|\PHPUnit\Framework\MockObject\MockObject */
private $navigationManager;
/** @var BackgroundService|\PHPUnit\Framework\MockObject\MockObject */
private $backgroundService;

protected function setUp(): void {
parent::setUp();
Expand All @@ -93,7 +91,6 @@ protected function setUp(): void {
$this->imageManager = $this->createMock(ImageManager::class);
$this->appManager = $this->createMock(IAppManager::class);
$this->navigationManager = $this->createMock(INavigationManager::class);
$this->backgroundService = $this->createMock(BackgroundService::class);
$this->defaults = new \OC_Defaults();
$this->urlGenerator
->expects($this->any())
Expand Down Expand Up @@ -474,9 +471,6 @@ public function testGetColorPrimaryWithDefaultBackground() {
}

public function testGetColorPrimaryWithCustomBackground() {
$backgroundIndex = 2;
$background = array_values($this->backgroundService->getShippedBackgrounds())[$backgroundIndex];

$user = $this->createMock(IUser::class);
$this->userSession->expects($this->any())
->method('getUser')
Expand All @@ -489,7 +483,7 @@ public function testGetColorPrimaryWithCustomBackground() {
->expects($this->once())
->method('getUserValue')
->with('user', 'theming', 'background_color', '')
->willReturn($background['primary_color']);
->willReturn('#04577e');

$this->config
->expects($this->exactly(2))
Expand All @@ -499,7 +493,7 @@ public function testGetColorPrimaryWithCustomBackground() {
['theming', 'disable-user-theming', 'no', 'no'],
]);

$this->assertEquals($background['primary_color'], $this->template->getColorPrimary());
$this->assertEquals('#04577e', $this->template->getColorPrimary());
}

public function testGetColorPrimaryWithCustomBackgroundColor() {
Expand Down

0 comments on commit 773fe16

Please sign in to comment.