@@ -19,19 +19,19 @@ class ColorTest extends TestCase
19
19
/** @dataProvider methods */
20
20
public function test_methods ($ method , $ color )
21
21
{
22
- $ this ->assertSame ("\033[0; {$ color }m {$ method }\033[0m " , (new Color () )->{$ method }($ method ));
22
+ $ this ->assertSame ("\033[0; {$ color }m {$ method }\033[0m " , (new Color )->{$ method }($ method ));
23
23
}
24
24
25
25
public function test_comment ()
26
26
{
27
- $ this ->assertSame ("\033[2;37mcomment \033[0m " , (new Color () )->comment ('comment ' ));
27
+ $ this ->assertSame ("\033[2;37mcomment \033[0m " , (new Color )->comment ('comment ' ));
28
28
}
29
29
30
30
public function test_custom_style ()
31
31
{
32
32
Color::style ('alert ' , ['bg ' => Color::YELLOW , 'fg ' => Color::RED , 'bold ' => 1 ]);
33
33
34
- $ this ->assertSame ("\033[1;31;43malert \033[0m " , (new Color () )->alert ('alert ' ));
34
+ $ this ->assertSame ("\033[1;31;43malert \033[0m " , (new Color )->alert ('alert ' ));
35
35
36
36
$ this ->expectException (\InvalidArgumentException::class);
37
37
$ this ->expectExceptionMessage ('Trying to define existing style ' );
@@ -49,7 +49,7 @@ public function test_invalid_custom_style()
49
49
50
50
public function test_colors ()
51
51
{
52
- $ c = new Color () ;
52
+ $ c = new Color ;
53
53
54
54
$ this ->assertSame ("\nabc \n" , $ c ->colors ('<eol>abc</eol> ' ));
55
55
$ this ->assertSame ("\033[0;31mRed \033[0m " , $ c ->colors ('<red>Red</end> ' ));
@@ -63,25 +63,25 @@ public function test_colors()
63
63
64
64
public function test_magic_call ()
65
65
{
66
- $ this ->assertSame ("\033[1;37mline \033[0m " , (new Color () )->bold ('line ' ));
66
+ $ this ->assertSame ("\033[1;37mline \033[0m " , (new Color )->bold ('line ' ));
67
67
68
68
$ this ->expectException (\InvalidArgumentException::class);
69
69
$ this ->expectExceptionMessage ('Text required ' );
70
70
71
- (new Color () )->bgRed ();
71
+ (new Color )->bgRed ();
72
72
}
73
73
74
74
public function test_magic_call_color ()
75
75
{
76
- $ this ->assertSame ("\033[0;35mpurple \033[0m " , (new Color () )->purple ('purple ' ));
76
+ $ this ->assertSame ("\033[0;35mpurple \033[0m " , (new Color )->purple ('purple ' ));
77
77
}
78
78
79
79
public function test_magic_call_invalid ()
80
80
{
81
81
$ this ->expectException (\InvalidArgumentException::class);
82
82
$ this ->expectExceptionMessage ('Style "random" not defined ' );
83
83
84
- (new Color () )->random ('Rand ' );
84
+ (new Color )->random ('Rand ' );
85
85
}
86
86
87
87
public function methods ()
0 commit comments