You are here

public function OutputFormatterStyleTest::testConstructor in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Formatter/OutputFormatterStyleTest.php \Symfony\Component\Console\Tests\Formatter\OutputFormatterStyleTest::testConstructor()

File

vendor/symfony/console/Tests/Formatter/OutputFormatterStyleTest.php, line 18

Class

OutputFormatterStyleTest

Namespace

Symfony\Component\Console\Tests\Formatter

Code

public function testConstructor() {
  $style = new OutputFormatterStyle('green', 'black', array(
    'bold',
    'underscore',
  ));
  $this
    ->assertEquals("\33[32;40;1;4mfoo\33[39;49;22;24m", $style
    ->apply('foo'));
  $style = new OutputFormatterStyle('red', null, array(
    'blink',
  ));
  $this
    ->assertEquals("\33[31;5mfoo\33[39;25m", $style
    ->apply('foo'));
  $style = new OutputFormatterStyle(null, 'white');
  $this
    ->assertEquals("\33[47mfoo\33[49m", $style
    ->apply('foo'));
}