2
2
3
3
namespace Binafy \tests ;
4
4
5
- use Binafy \PhpColorGenerator \ColorService ;
5
+ use Binafy \PhpColorGenerator \Color ;
6
6
use PHPUnit \Framework \TestCase ;
7
7
8
- class ColorServiceTest extends TestCase
8
+ class ColorTest extends TestCase
9
9
{
10
10
/**
11
11
* Test get shades from hex color.
12
12
*/
13
13
public function test_get_shades_from_hex_color (): void
14
14
{
15
- $ colors = ColorService ::generateShades ('1363df ' , 10 );
15
+ $ colors = Color ::generateShades ('1363df ' , 10 );
16
16
17
17
$ this ->assertIsArray ($ colors );
18
18
$ this ->assertEquals ([
@@ -34,7 +34,7 @@ public function test_get_shades_from_hex_color(): void
34
34
*/
35
35
public function test_get_tints_from_hex_color (): void
36
36
{
37
- $ colors = ColorService ::generateTints ('1363df ' , 10 );
37
+ $ colors = Color ::generateTints ('1363df ' , 10 );
38
38
39
39
$ this ->assertIsArray ($ colors );
40
40
$ this ->assertEquals ([
@@ -56,7 +56,7 @@ public function test_get_tints_from_hex_color(): void
56
56
*/
57
57
public function test_hex_to_rgb (): void
58
58
{
59
- $ colors = ColorService ::hexToRgb ('1363df ' );
59
+ $ colors = Color ::hexToRgb ('1363df ' );
60
60
61
61
$ this ->assertIsArray ($ colors );
62
62
$ this ->assertEquals ([
@@ -71,7 +71,7 @@ public function test_hex_to_rgb(): void
71
71
*/
72
72
public function test_rgb_to_hex (): void
73
73
{
74
- $ color = ColorService ::rgbToHex ([
74
+ $ color = Color ::rgbToHex ([
75
75
'red ' => '19 ' ,
76
76
'green ' => '99 ' ,
77
77
'blue ' => '223 ' ,
@@ -86,7 +86,7 @@ public function test_rgb_to_hex(): void
86
86
*/
87
87
public function test_rgb_to_darken_colors (): void
88
88
{
89
- $ colors = ColorService ::darken ([
89
+ $ colors = Color ::darken ([
90
90
'red ' => '19 ' ,
91
91
'green ' => '99 ' ,
92
92
'blue ' => '223 ' ,
@@ -105,7 +105,7 @@ public function test_rgb_to_darken_colors(): void
105
105
*/
106
106
public function test_rgb_to_lighten_colors (): void
107
107
{
108
- $ colors = ColorService ::lighten ([
108
+ $ colors = Color ::lighten ([
109
109
'red ' => '19 ' ,
110
110
'green ' => '99 ' ,
111
111
'blue ' => '223 ' ,
@@ -124,7 +124,7 @@ public function test_rgb_to_lighten_colors(): void
124
124
*/
125
125
public function test_generate_dark_and_bright_colors_from_hex_color (): void
126
126
{
127
- $ colors = (new ColorService )->generateDarkBrightColors ('1363df ' );
127
+ $ colors = (new Color )->generateDarkBrightColors ('1363df ' );
128
128
129
129
$ this ->assertIsArray ($ colors );
130
130
$ this ->assertArrayHasKey ('dark ' , $ colors );
0 commit comments