Skip to content

Commit

Permalink
minor #21804 [Console] Test inline styles with non-decorated formatte…
Browse files Browse the repository at this point in the history
…r (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
  • Loading branch information
fabpot committed Feb 28, 2017
2 parents 4597768 + 8530e05 commit 908d470
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -196,6 +196,9 @@ public function testNotDecoratedFormatter()
$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);

Expand All @@ -211,6 +214,9 @@ public function testNotDecoratedFormatter()
$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()
Expand Down

0 comments on commit 908d470

Please sign in to comment.