Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <[email protected]>
  • Loading branch information
szaimen committed May 10, 2023
1 parent eb87705 commit ca11186
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/theming/tests/CapabilitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function testGetCapabilities($name, $url, $slogan, $color, $textColor, $l
$this->util->expects($this->exactly(3))
->method('elementColor')
->with($color)
->willReturnCallback(static function (string $color, bool $brightBackground = true) use ($util) {
->willReturnCallback(static function (string $color, ?bool $brightBackground = null) use ($util) {
return $util->elementColor($color, $brightBackground);
});

Expand Down
6 changes: 3 additions & 3 deletions apps/theming/tests/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,17 @@ public function testInvertTextColorEmpty() {

public function testElementColorDefault() {
$elementColor = $this->util->elementColor("#000000");
$this->assertEquals('#000000', $elementColor);
$this->assertEquals('#4d4d4d', $elementColor);
}

public function testElementColorOnDarkBackground() {
$elementColor = $this->util->elementColor("#000000", false);
$this->assertEquals('#8c8c8c', $elementColor);
$this->assertEquals('#4d4d4d', $elementColor);
}

public function testElementColorOnBrightBackground() {
$elementColor = $this->util->elementColor('#ffffff');
$this->assertEquals('#aaaaaa', $elementColor);
$this->assertEquals('#b3b3b3', $elementColor);
}

public function testGenerateRadioButtonWhite() {
Expand Down

0 comments on commit ca11186

Please sign in to comment.