mirror of
https://github.com/composer/composer
synced 2025-05-08 16:17:37 +00:00
Remove usage of echo when executing Composer script
This commit is contained in:
parent
0ffa1db489
commit
103624d4ed
3 changed files with 27 additions and 4 deletions
|
@ -35,6 +35,17 @@ class ProcessExecutorTest extends TestCase
|
|||
$this->assertEquals("foo".PHP_EOL, $output);
|
||||
}
|
||||
|
||||
public function testUseIOIsNotNullAndIfNotCaptured()
|
||||
{
|
||||
$io = $this->getMock('Composer\IO\IOInterface');
|
||||
$io->expects($this->once())
|
||||
->method('write')
|
||||
->with($this->equalTo('foo'.PHP_EOL));
|
||||
|
||||
$process = new ProcessExecutor($io);
|
||||
$process->execute('echo foo');
|
||||
}
|
||||
|
||||
public function testExecuteCapturesStderr()
|
||||
{
|
||||
$process = new ProcessExecutor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue