22
33namespace Binafy \tests ;
44
5- use Binafy \PhpColorGenerator \ColorService ;
5+ use Binafy \PhpColorGenerator \Color ;
66use PHPUnit \Framework \TestCase ;
77
8- class ColorServiceTest extends TestCase
8+ class ColorTest extends TestCase
99{
1010 /**
1111 * Test get shades from hex color.
1212 */
1313 public function test_get_shades_from_hex_color (): void
1414 {
15- $ colors = ColorService ::generateShades ('1363df ' , 10 );
15+ $ colors = Color ::generateShades ('1363df ' , 10 );
1616
1717 $ this ->assertIsArray ($ colors );
1818 $ this ->assertEquals ([
@@ -34,7 +34,7 @@ public function test_get_shades_from_hex_color(): void
3434 */
3535 public function test_get_tints_from_hex_color (): void
3636 {
37- $ colors = ColorService ::generateTints ('1363df ' , 10 );
37+ $ colors = Color ::generateTints ('1363df ' , 10 );
3838
3939 $ this ->assertIsArray ($ colors );
4040 $ this ->assertEquals ([
@@ -56,7 +56,7 @@ public function test_get_tints_from_hex_color(): void
5656 */
5757 public function test_hex_to_rgb (): void
5858 {
59- $ colors = ColorService ::hexToRgb ('1363df ' );
59+ $ colors = Color ::hexToRgb ('1363df ' );
6060
6161 $ this ->assertIsArray ($ colors );
6262 $ this ->assertEquals ([
@@ -71,7 +71,7 @@ public function test_hex_to_rgb(): void
7171 */
7272 public function test_rgb_to_hex (): void
7373 {
74- $ color = ColorService ::rgbToHex ([
74+ $ color = Color ::rgbToHex ([
7575 'red ' => '19 ' ,
7676 'green ' => '99 ' ,
7777 'blue ' => '223 ' ,
@@ -86,7 +86,7 @@ public function test_rgb_to_hex(): void
8686 */
8787 public function test_rgb_to_darken_colors (): void
8888 {
89- $ colors = ColorService ::darken ([
89+ $ colors = Color ::darken ([
9090 'red ' => '19 ' ,
9191 'green ' => '99 ' ,
9292 'blue ' => '223 ' ,
@@ -105,7 +105,7 @@ public function test_rgb_to_darken_colors(): void
105105 */
106106 public function test_rgb_to_lighten_colors (): void
107107 {
108- $ colors = ColorService ::lighten ([
108+ $ colors = Color ::lighten ([
109109 'red ' => '19 ' ,
110110 'green ' => '99 ' ,
111111 'blue ' => '223 ' ,
@@ -124,7 +124,7 @@ public function test_rgb_to_lighten_colors(): void
124124 */
125125 public function test_generate_dark_and_bright_colors_from_hex_color (): void
126126 {
127- $ colors = (new ColorService )->generateDarkBrightColors ('1363df ' );
127+ $ colors = (new Color )->generateDarkBrightColors ('1363df ' );
128128
129129 $ this ->assertIsArray ($ colors );
130130 $ this ->assertArrayHasKey ('dark ' , $ colors );
0 commit comments