diff options
Diffstat (limited to 'mexitek/phpcolors/tests/colorComplementary.phpt')
-rw-r--r-- | mexitek/phpcolors/tests/colorComplementary.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mexitek/phpcolors/tests/colorComplementary.phpt b/mexitek/phpcolors/tests/colorComplementary.phpt new file mode 100644 index 00000000..2876b5c8 --- /dev/null +++ b/mexitek/phpcolors/tests/colorComplementary.phpt @@ -0,0 +1,28 @@ +<?php + +require __DIR__ . '/bootstrap.php'; + +use Mexitek\PHPColors\Color; +use Tester\Assert; + + +$expected = array( + "ff0000" => "00ffff", + "0000ff" => "ffff00", + "00ff00" => "ff00ff", + "ffff00" => "0000ff", + "00ffff" => "ff0000", + "49cbaf" => "cb4965", + "003eb2" => "b27400", + "b27400" => "003eb2", + "ffff99" => "9999ff", + "ccff00" => "3300ff", + "3300ff" => "ccff00", + "fb4a2c" => "2cddfb", + "9cebff" => "ffb09c", +); + +foreach ($expected as $original => $complementary) { + $color = new Color($original); + Assert::same($complementary, $color->complementary(), 'Incorrect complementary color returned.'); +} |