mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Remove ANSI control characters from suggested packages output.
This commit is contained in:
parent
be201924cd
commit
401ef69ae3
2 changed files with 29 additions and 2 deletions
|
@ -144,6 +144,20 @@ class SuggestedPackagesReporterTest extends \PHPUnit_Framework_TestCase
|
|||
$this->suggestedPackagesReporter->output();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::output
|
||||
*/
|
||||
public function testOutputIgnoresFormatting()
|
||||
{
|
||||
$this->suggestedPackagesReporter->addPackage('source', 'target', "\x1b[1;37;42m Like us\r\non Facebook \x1b[0m");
|
||||
|
||||
$this->io->expects($this->once())
|
||||
->method('writeError')
|
||||
->with("source suggests installing target ([1;37;42m Like us on Facebook [0m)");
|
||||
|
||||
$this->suggestedPackagesReporter->output();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::output
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue