8000 minor #21804 [Console] Test inline styles with non-decorated formatte… · teohhanhui/symfony@908d470 · GitHub
[go: up one dir, main page]

Skip to content

Commit 908d470

Browse files
committed
minor symfony#21804 [Console] Test inline styles with non-decorated formatter (julienfalque)
This PR was merged into the 2.7 branch. Discussion ---------- [Console] Test inline styles with non-decorated formatter | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Small improvement of `OutputFormatter` test. Commits ------- 8530e05 Test inline styles with non-decorated formatter
2 parents 4597768 + 8530e05 commit 908d470

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ public function testNotDecoratedFormatter()
196196
$this->assertEquals(
197197
'some question', $formatter->format('<question>some question</question>')
198198
);
199+
$this->assertEquals(
200+
'some text with inline style', $formatter->format('<fg=red>some text with inline style</>')
201+
);
199202

200203
$formatter->setDecorated(true);
201204

@@ -211,6 +214,9 @@ public function testNotDecoratedFormatter()
211214
$this->assertEquals(
212215
"\033[30;46msome question\033[39;49m", $formatter->format('<question>some question</question>')
213216
);
217+
$this->assertEquals(
218+
"\033[31msome text with inline style\033[39m", $formatter->format('<fg=red>some text with inline style</>')
219+
);
214220
}
215221

216222
public function testContentWithLineBreaks()

0 commit comments

Comments
 (0)
0