File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
src/Symfony/Component/Console/Tests Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,14 @@ public function testDegradedTrueColors()
46
46
$ colorterm = getenv ('COLORTERM ' );
47
47
putenv ('COLORTERM= ' );
48
48
49
- $ color = new Color ('#f00 ' , '#ff0 ' );
50
- $ this ->assertSame ("\033[31;43m \033[39;49m " , $ color ->apply (' ' ));
51
-
52
- $ color = new Color ('#c0392b ' , '#f1c40f ' );
53
- $ this ->assertSame ("\033[31;43m \033[39;49m " , $ color ->apply (' ' ));
54
-
55
- putenv ('COLORTERM= ' .$ colorterm );
49
+ try {
50
+ $ color = new Color ('#f00 ' , '#ff0 ' );
51
+ $ this ->assertSame ("\033[31;43m \033[39;49m " , $ color ->apply (' ' ));
52
+
53
+ $ color = new Color ('#c0392b ' , '#f1c40f ' );
54
+ $ this ->assertSame ("\033[31;43m \033[39;49m " , $ color ->apply (' ' ));
55
+ } finally {
56
+ putenv ('COLORTERM= ' .$ colorterm );
57
+ }
56
58
}
57
59
}
You can’t perform that action at this time.
0 commit comments