use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Color;
use Symfony\Component\Console\Output\AnsiColorMode;
use Symfony\Component\Console\Terminal;
class ColorTest extends TestCase
{ public function testAnsi4Colors() { $color =
new Color();
$this->
assertSame(' ',
$color->
apply(' '
));
$color =
new Color('red', 'yellow'
);
$this->
assertSame("\033[31;43m \033[39;49m",
$color->
apply(' '
));
$color =
new Color('bright-red', 'bright-yellow'
);
$this->
assertSame("\033[91;103m \033[39;49m",
$color->
apply(' '
));
$color =
new Color('red', 'yellow',
['underscore'
]);
$this->
assertSame("\033[31;43;4m \033[39;49;24m",
$color->
apply(' '
));
}