1 | <?php |
||||
2 | |||||
3 | namespace PhpOffice\PhpSpreadsheetTests\Style; |
||||
4 | |||||
5 | use PhpOffice\PhpSpreadsheet\Style\Color; |
||||
6 | use PHPUnit\Framework\TestCase; |
||||
7 | |||||
8 | class ColorTest extends TestCase |
||||
9 | { |
||||
10 | /** |
||||
11 | * @dataProvider providerColorGetRed |
||||
12 | * |
||||
13 | * @param mixed $expectedResult |
||||
14 | */ |
||||
15 | public function testGetRed($expectedResult, ...$args) |
||||
16 | { |
||||
17 | $result = Color::getRed(...$args); |
||||
1 ignored issue
–
show
Bug
introduced
by
Loading history...
|
|||||
18 | self::assertEquals($expectedResult, $result); |
||||
19 | } |
||||
20 | |||||
21 | public function providerColorGetRed() |
||||
22 | { |
||||
23 | return require 'data/Style/ColorGetRed.php'; |
||||
24 | } |
||||
25 | |||||
26 | /** |
||||
27 | * @dataProvider providerColorGetGreen |
||||
28 | * |
||||
29 | * @param mixed $expectedResult |
||||
30 | */ |
||||
31 | public function testGetGreen($expectedResult, ...$args) |
||||
32 | { |
||||
33 | $result = Color::getGreen(...$args); |
||||
1 ignored issue
–
show
$args is expanded, but the parameter $RGB of PhpOffice\PhpSpreadsheet\Style\Color::getGreen() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
34 | self::assertEquals($expectedResult, $result); |
||||
35 | } |
||||
36 | |||||
37 | public function providerColorGetGreen() |
||||
38 | { |
||||
39 | return require 'data/Style/ColorGetGreen.php'; |
||||
40 | } |
||||
41 | |||||
42 | /** |
||||
43 | * @dataProvider providerColorGetBlue |
||||
44 | * |
||||
45 | * @param mixed $expectedResult |
||||
46 | */ |
||||
47 | public function testGetBlue($expectedResult, ...$args) |
||||
48 | { |
||||
49 | $result = Color::getBlue(...$args); |
||||
1 ignored issue
–
show
$args is expanded, but the parameter $RGB of PhpOffice\PhpSpreadsheet\Style\Color::getBlue() does not expect variable arguments.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
50 | self::assertEquals($expectedResult, $result); |
||||
51 | } |
||||
52 | |||||
53 | public function providerColorGetBlue() |
||||
54 | { |
||||
55 | return require 'data/Style/ColorGetBlue.php'; |
||||
56 | } |
||||
57 | |||||
58 | /** |
||||
59 | * @dataProvider providerColorChangeBrightness |
||||
60 | * |
||||
61 | * @param mixed $expectedResult |
||||
62 | */ |
||||
63 | public function testChangeBrightness($expectedResult, ...$args) |
||||
64 | { |
||||
65 | $result = Color::changeBrightness(...$args); |
||||
66 | self::assertEquals($expectedResult, $result); |
||||
67 | } |
||||
68 | |||||
69 | public function providerColorChangeBrightness() |
||||
70 | { |
||||
71 | return require 'data/Style/ColorChangeBrightness.php'; |
||||
72 | } |
||||
73 | } |
||||
74 |