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

colorChange.phpt « tests « phpcolors « mexitek - github.com/nextcloud/3rdparty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 373f34efef0184ab7348575a80b4aa32be019895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

require __DIR__ . '/bootstrap.php';

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


$expected = array(
    "336699" => "264d73",
    "913399" => "6d2673"
);

foreach ($expected as $original => $darker) {
    $color = new Color($original);
    Assert::same($darker, $color->darken(), 'Incorrect darker color returned.');
}


$expected = array(
    "336699" => "4080bf",
    "913399" => "b540bf"
);

foreach ($expected as $original => $lighter) {
    $color = new Color($original);
    Assert::same($lighter, $color->lighten(), "Incorrect lighter color returned.");
}