Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | class ColorsTest extends AbstractTest |
||
12 | { |
||
13 | public function test_colors() |
||
18 | } |
||
19 | |||
20 | |||
21 | /** |
||
22 | * @param $color |
||
23 | * @param $output |
||
24 | * @dataProvider data_rgb |
||
25 | */ |
||
26 | public function test_rgb($color, $output) |
||
27 | { |
||
28 | self::assertSame($output, Colors::rgb($color)); |
||
29 | } |
||
30 | |||
31 | public function data_rgb(): array |
||
32 | { |
||
33 | return [ |
||
34 | ['fff', [255, 0, 0]], |
||
35 | ['0D0E0F', [208, 224, 15]], |
||
36 | ]; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param $color |
||
41 | * @param $output |
||
42 | * @dataProvider data_name |
||
43 | */ |
||
44 | public function test_name($color, $output) |
||
45 | { |
||
46 | $return = Colors::name($color); |
||
47 | self::assertSame($output, $return[1]); |
||
48 | } |
||
49 | |||
50 | public function data_name(): array |
||
55 | ]; |
||
56 | } |
||
57 | } |