ProcessExecutor - do not format output from executed processes
parent
c5873e11f2
commit
7d4d4622ab
|
@ -12,9 +12,14 @@
|
|||
|
||||
namespace Composer\Test\Util;
|
||||
|
||||
use Composer\IO\ConsoleIO;
|
||||
use Composer\Util\ProcessExecutor;
|
||||
use Composer\Test\TestCase;
|
||||
use Composer\IO\BufferIO;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\BufferedOutput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
|
||||
class ProcessExecutorTest extends TestCase
|
||||
|
@ -99,4 +104,13 @@ class ProcessExecutorTest extends TestCase
|
|||
$this->assertEquals(array('foo', 'bar'), $process->splitLines("foo\r\nbar"));
|
||||
$this->assertEquals(array('foo', 'bar'), $process->splitLines("foo\r\nbar\n"));
|
||||
}
|
||||
|
||||
public function testConsoleIODoesNotFormatSymfonyConsoleStyle()
|
||||
{
|
||||
$output = new BufferedOutput(OutputInterface::VERBOSITY_NORMAL, true);
|
||||
$process = new ProcessExecutor(new ConsoleIO(new ArrayInput([]), $output, new HelperSet([])));
|
||||
|
||||
$process->execute('echo \'<error>foo</error>\'');
|
||||
$this->assertSame('<error>foo</error>', $output->fetch());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue