Welcome to mirror list, hosted at ThFree Co, Russian Federation.

colorInput.phpt « tests « phpcolors « mexitek - github.com/nextcloud/3rdparty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8ace305782164c4c6e7b21926bd93a399ec9d25c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

require __DIR__ . '/bootstrap.php';

use Mexitek\PHPColors\Color;
use Tester\Assert;

// Test that a hex starting with '#' is supported as input
$expected = array(
    "#ffffff",
    "#00ff00",
    "#000000",
    "#ff9a00",
);

foreach ($expected as $input) {
    $color = new Color($input);
    Assert::same((string) $color, $input, 'Incorrect color returned.');
}