[ 'unformatted' => '', 'expected' => '', ], 'no empty span' => [ 'unformatted' => 'This text is unformatted', 'expected' => 'This text is unformatted', ], 'named formats are converted' => [ 'unformatted' => 'This text has some formatting', 'expected' => 'This text has some formatting', ], 'fg and bg are converted' => [ 'unformatted' => 'This text has some formatting', 'expected' => 'This text has some formatting', ], 'bold and underscore are converted' => [ 'unformatted' => 'This text has some formatting', 'expected' => 'This text has some formatting', ], 'multiple styles are converted' => [ 'unformatted' => 'This text has some formatting', 'expected' => 'This text has some formatting', ], 'hyperlinks are converted' => [ 'unformatted' => 'This text has a link', 'expected' => 'This text has a link', ], ]; } #[DataProvider('provideConvert')] public function testConvert(string $unformatted, string $expected): void { $converter = new AnsiToHtmlConverter(); $ansiFormatter = new OutputFormatter(true); $formatted = $ansiFormatter->format($unformatted); $this->assertSame($expected, $converter->convert($formatted)); } }