You are here

public function OutputFormatterTest::testRedefineStyle in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php \Symfony\Component\Console\Tests\Formatter\OutputFormatterTest::testRedefineStyle()

File

vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php, line 137

Class

OutputFormatterTest

Namespace

Symfony\Component\Console\Tests\Formatter

Code

public function testRedefineStyle() {
  $formatter = new OutputFormatter(true);
  $style = new OutputFormatterStyle('blue', 'white');
  $formatter
    ->setStyle('info', $style);
  $this
    ->assertEquals("\33[34;47msome custom msg\33[39;49m", $formatter
    ->format('<info>some custom msg</info>'));
}