You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

colorChange.phpt 576B

12345678910111213141516171819202122232425262728
  1. <?php
  2. require __DIR__ . '/bootstrap.php';
  3. use Mexitek\PHPColors\Color;
  4. use Tester\Assert;
  5. $expected = array(
  6. "336699" => "264d73",
  7. "913399" => "6d2673"
  8. );
  9. foreach ($expected as $original => $darker) {
  10. $color = new Color($original);
  11. Assert::same($darker, $color->darken(), 'Incorrect darker color returned.');
  12. }
  13. $expected = array(
  14. "336699" => "4080bf",
  15. "913399" => "b540bf"
  16. );
  17. foreach ($expected as $original => $lighter) {
  18. $color = new Color($original);
  19. Assert::same($lighter, $color->lighten(), "Incorrect lighter color returned.");
  20. }