File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
src/Symfony/Component/Console Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
29
29
'magenta ' => 35 ,
30
30
'cyan ' => 36 ,
31
31
'white ' => 37 ,
32
+ 'default ' => 39 ,
32
33
);
33
34
private static $ availableBackgroundColors = array (
34
35
'black ' => 40 ,
@@ -39,6 +40,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
39
40
'magenta ' => 45 ,
40
41
'cyan ' => 46 ,
41
42
'white ' => 47 ,
43
+ 'default ' => 49 ,
42
44
);
43
45
private static $ availableOptions = array (
44
46
'bold ' => 1 ,
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ public function testForeground()
37
37
$ style ->setForeground ('blue ' );
38
38
$ this ->assertEquals ("\033[34mfoo \033[0m " , $ style ->apply ('foo ' ));
39
39
40
+ $ style ->setForeground ('default ' );
41
+ $ this ->assertEquals ("\033[39mfoo \033[39m " , $ style ->apply ('foo ' ));
42
+
40
43
$ this ->setExpectedException ('InvalidArgumentException ' );
41
44
$ style ->setForeground ('undefined-color ' );
42
45
}
@@ -51,6 +54,9 @@ public function testBackground()
51
54
$ style ->setBackground ('yellow ' );
52
55
$ this ->assertEquals ("\033[43mfoo \033[0m " , $ style ->apply ('foo ' ));
53
56
57
+ $ style ->setBackground ('default ' );
58
+ $ this ->assertEquals ("\033[49mfoo \033[49m " , $ style ->apply ('foo ' ));
59
+
54
60
$ this ->setExpectedException ('InvalidArgumentException ' );
55
61
$ style ->setBackground ('undefined-color ' );
56
62
}
You can’t perform that action at this time.
0 commit comments