public function OutputFormatterTest::testNewStyle in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php \Symfony\Component\Console\Tests\Formatter\OutputFormatterTest::testNewStyle()
File
- vendor/
symfony/ console/ Tests/ Formatter/ OutputFormatterTest.php, line 121
Class
Namespace
Symfony\Component\Console\Tests\FormatterCode
public function testNewStyle() {
$formatter = new OutputFormatter(true);
$style = new OutputFormatterStyle('blue', 'white');
$formatter
->setStyle('test', $style);
$this
->assertEquals($style, $formatter
->getStyle('test'));
$this
->assertNotEquals($style, $formatter
->getStyle('info'));
$style = new OutputFormatterStyle('blue', 'white');
$formatter
->setStyle('b', $style);
$this
->assertEquals("\33[34;47msome \33[39;49m\33[34;47mcustom\33[39;49m\33[34;47m msg\33[39;49m", $formatter
->format('<test>some <b>custom</b> msg</test>'));
}