namespace Symfony\Component\Console\Tests\Formatter;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
class OutputFormatterStyleTest extends TestCase
{ public function testConstructor() { $style =
new OutputFormatterStyle('green', 'black',
['bold', 'underscore'
]);
$this->
assertEquals("\033[32;40;1;4mfoo\033[39;49;22;24m",
$style->
apply('foo'
));
$style =
new OutputFormatterStyle('red', null,
['blink'
]);
$this->
assertEquals("\033[31;5mfoo\033[39;25m",
$style->
apply('foo'
));
$style =
new OutputFormatterStyle(null, 'white'
);
$this->
assertEquals("\033[47mfoo\033[49m",
$style->
apply('foo'
));
} public function testForeground() {