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("[34;47msome [39;49m[34;47mcustom[39;49m[34;47m msg[39;49m", $formatter->format('<test>some <b>custom</b> msg</test>')); }