minor #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
-------

8530e05574 Test inline styles with non-decorated formatter
This commit is contained in:
Fabien Potencier 2017-02-28 14:11:15 -08:00
commit 908d470749

View File

@ -196,6 +196,9 @@ class OutputFormatterTest extends TestCase
$this->assertEquals(
'some question', $formatter->format('<question>some question</question>')
);
$this->assertEquals(
'some text with inline style', $formatter->format('<fg=red>some text with inline style</>')
);
$formatter->setDecorated(true);
@ -211,6 +214,9 @@ class OutputFormatterTest extends TestCase
$this->assertEquals(
"\033[30;46msome question\033[39;49m", $formatter->format('<question>some question</question>')
);
$this->assertEquals(
"\033[31msome text with inline style\033[39m", $formatter->format('<fg=red>some text with inline style</>')
);
}
public function testContentWithLineBreaks()