@@ -25,7 +25,7 @@ class SettingsParseArgumentsTest extends Tester\TestCase
25
25
$ expectedSettings ->extensions = array ('php ' , 'phtml ' , 'php3 ' , 'php4 ' , 'php5 ' );
26
26
$ expectedSettings ->paths = array ('. ' );
27
27
$ expectedSettings ->excluded = array ();
28
- $ expectedSettings ->colors = true ;
28
+ $ expectedSettings ->colors = Settings:: AUTODETECT ;
29
29
$ expectedSettings ->json = false ;
30
30
31
31
Assert::equal ($ expectedSettings ->phpExecutable , $ settings ->phpExecutable );
@@ -53,7 +53,7 @@ class SettingsParseArgumentsTest extends Tester\TestCase
53
53
$ expectedSettings ->extensions = array ('php ' , 'phtml ' , 'php3 ' , 'php4 ' , 'php5 ' );
54
54
$ expectedSettings ->paths = array ('. ' );
55
55
$ expectedSettings ->excluded = array ('vendor ' );
56
- $ expectedSettings ->colors = false ;
56
+ $ expectedSettings ->colors = Settings:: DISABLED ;
57
57
$ expectedSettings ->json = false ;
58
58
59
59
Assert::equal ($ expectedSettings ->phpExecutable , $ settings ->phpExecutable );
@@ -66,6 +66,18 @@ class SettingsParseArgumentsTest extends Tester\TestCase
66
66
Assert::equal ($ expectedSettings ->colors , $ settings ->colors );
67
67
Assert::equal ($ expectedSettings ->json , $ settings ->json );
68
68
}
69
+
70
+ public function testColorsForced ()
71
+ {
72
+ $ commandLine = "./parallel-lint --exclude vendor --colors . " ;
73
+ $ argv = explode (" " , $ commandLine );
74
+ $ settings = Settings::parseArguments ($ argv );
75
+
76
+ $ expectedSettings = new Settings ();
77
+ $ expectedSettings ->colors = Settings::FORCED ;
78
+
79
+ Assert::equal ($ expectedSettings ->colors , $ settings ->colors );
80
+ }
69
81
}
70
82
71
83
$ testCase = new SettingsParseArgumentsTest ;
0 commit comments