[Console] Added test for non style tag formatting.

This commit is contained in:
Jean-François Simon 2012-08-06 21:21:07 +02:00
parent 842b599c50
commit c7e324af90
1 changed files with 9 additions and 0 deletions

View File

@ -115,6 +115,15 @@ class FormatterStyleTest extends \PHPUnit_Framework_TestCase
$this->assertEquals("\033[34;41msome text\033[0m", $formatter->format('<fg=blue;bg=red>some text</fg=blue;bg=red>'));
}
/**
* @group nst
*/
public function testNonStyleTag()
{
$formatter = new OutputFormatter(true);
$this->assertEquals("\033[32msome \033[0m\033[32m<tag> styled\033[0m", $formatter->format('<info>some <tag> styled</info>'));
}
public function testNotDecoratedFormatter()
{
$formatter = new OutputFormatter(false);