diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-06-23 11:42:14 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-07-05 14:44:44 +0200 |
commit | ec5cbdeb7ffb87c0169c39e6f44846e819b41f14 (patch) | |
tree | 275f11c139076fbcb60cc39c8ce609dfd3f41f82 /tests/lib/Avatar/UserAvatarTest.php | |
parent | 812016d62614ac3669a3fdf51fa2e07170e08c08 (diff) | |
download | nextcloud-server-ec5cbdeb7ffb87c0169c39e6f44846e819b41f14.tar.gz nextcloud-server-ec5cbdeb7ffb87c0169c39e6f44846e819b41f14.zip |
Make Color class public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'tests/lib/Avatar/UserAvatarTest.php')
-rw-r--r-- | tests/lib/Avatar/UserAvatarTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php index bd45a819760..b2b4ebba343 100644 --- a/tests/lib/Avatar/UserAvatarTest.php +++ b/tests/lib/Avatar/UserAvatarTest.php @@ -258,17 +258,17 @@ class UserAvatarTest extends \Test\TestCase { } public function testMixPalette() { - $colorFrom = new \OC\Color(0, 0, 0); - $colorTo = new \OC\Color(6, 12, 18); + $colorFrom = new \OCP\Color(0, 0, 0); + $colorTo = new \OCP\Color(6, 12, 18); $steps = 6; - $palette = $this->invokePrivate($this->avatar, 'mixPalette', [$steps, $colorFrom, $colorTo]); + $palette = \OCP\Color::mixPalette($steps, $colorFrom, $colorTo); foreach ($palette as $j => $color) { // calc increment - $incR = $colorTo->r / $steps * $j; - $incG = $colorTo->g / $steps * $j; - $incB = $colorTo->b / $steps * $j; + $incR = $colorTo->red() / $steps * $j; + $incG = $colorTo->green() / $steps * $j; + $incB = $colorTo->blue() / $steps * $j; // ensure everything is equal - $this->assertEquals($color, new \OC\Color($incR, $incG, $incB)); + $this->assertEquals($color, new \OCP\Color($incR, $incG, $incB)); } $hashToInt = $this->invokePrivate($this->avatar, 'hashToInt', ['abcdef', 18]); $this->assertTrue(gettype($hashToInt) === 'integer'); |