public function testWriteRemovesTagsIfAnsiNotSupported()
{
$stream = $this->getMockBuilder('Webmozart\\Console\\IO\\OutputStream\\BufferedOutputStream')->setMethods(array('supportsAnsi'))->getMock();
$stream->expects($this->any())->method('supportsAnsi')->willReturn(false);
$ansiFormatter = $this->getMockBuilder('Webmozart\\Console\\Formatter\\AnsiFormatter')->setMethods(array('format', 'removeFormat'))->getMock();
$ansiFormatter->expects($this->once())->method('removeFormat')->with('<tag>text</tag>')->willReturn('text');
$this->output->setStream($stream);
$this->output->setFormatter($ansiFormatter);
$this->output->write('<tag>text</tag>');
$this->assertSame('text', $stream->fetch());
}