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.

colorInput.phpt 373B

12345678910111213141516171819
  1. <?php
  2. require __DIR__ . '/bootstrap.php';
  3. use Mexitek\PHPColors\Color;
  4. use Tester\Assert;
  5. // Test that a hex starting with '#' is supported as input
  6. $expected = array(
  7. "#ffffff",
  8. "#00ff00",
  9. "#000000",
  10. "#ff9a00",
  11. );
  12. foreach ($expected as $input) {
  13. $color = new Color($input);
  14. Assert::same((string) $color, $input, 'Incorrect color returned.');
  15. }