1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 09:10:21 +02:00

Added missing tests

This commit is contained in:
Oliver Vogel
2021-12-01 19:20:35 +01:00
parent 9ce28b7f78
commit 440e642403

View File

@@ -62,6 +62,15 @@ class ColorTest extends TestCase
$this->assertEquals([0, 0, 120, .5], $color->toArray());
}
public function testToInt(): void
{
$color = $this->getTestColor(0, 0, 0, 0);
$this->assertEquals(0, $color->toInt());
$color = $this->getTestColor(255, 255, 255, 0);
$this->assertEquals(16777215, $color->toInt());
}
public function testToHex(): void
{
$color = $this->getTestColor(181, 55, 23);