![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/syn.corals.io/vendor/league/glide/tests/Manipulators/Helpers/ |
<?php namespace League\Glide\Manipulators\Helpers; use PHPUnit\Framework\TestCase; class ColorTest extends TestCase { public function testThreeDigitColorCode() { $color = new Color('000'); $this->assertSame('rgba(0, 0, 0, 1)', $color->formatted()); } public function testFourDigitColorCode() { $color = new Color('5000'); $this->assertSame('rgba(0, 0, 0, 0.5)', $color->formatted()); } public function testSixDigitColorCode() { $color = new Color('000000'); $this->assertSame('rgba(0, 0, 0, 1)', $color->formatted()); } public function testEightDigitColorCode() { $color = new Color('50000000'); $this->assertSame('rgba(0, 0, 0, 0.5)', $color->formatted()); } public function testNamedColorCode() { $color = new Color('black'); $this->assertSame('rgba(0, 0, 0, 1)', $color->formatted()); } public function testUnknownColor() { $color = new Color('unknown'); $this->assertSame('rgba(255, 255, 255, 0)', $color->formatted()); } }