1
0
Fork 0

add test exposing the problem

pull/5723/head
Rob Bast 2016-09-27 14:45:19 +02:00
parent 3030dab90e
commit b4fd19aae4
No known key found for this signature in database
GPG Key ID: 73076E35E6165F39
1 changed files with 7 additions and 1 deletions

View File

@ -54,10 +54,16 @@ class ProcessExecutorTest extends TestCase
{ {
$process = new ProcessExecutor($buffer = new BufferIO('', StreamOutput::VERBOSITY_DEBUG)); $process = new ProcessExecutor($buffer = new BufferIO('', StreamOutput::VERBOSITY_DEBUG));
$process->execute('echo https://foo:bar@example.org/ && echo http://foo@example.org && echo http://abcdef1234567890234578:x-oauth-token@github.com/', $output); $process->execute('echo https://foo:bar@example.org/ && echo http://foo@example.org && echo http://abcdef1234567890234578:x-oauth-token@github.com/', $output);
$this->assertEquals('Executing command (CWD): echo https://foo:***@example.org/ && echo http://foo@example.org && echo http://***:***@github.com/', trim($buffer->getOutput())); $this->assertEquals('Executing command (CWD): echo https://foo:***@example.org/ && echo http://foo@example.org && echo http://***:***@github.com/', trim($buffer->getOutput()));
} }
public function testDoesntHidePorts()
{
$process = new ProcessExecutor($buffer = new BufferIO('', StreamOutput::VERBOSITY_DEBUG));
$process->execute('echo https://localhost:1234/', $output);
$this->assertEquals('Executing command (CWD): echo https://localhost:1234/', trim($buffer->getOutput()));
}
public function testSplitLines() public function testSplitLines()
{ {
$process = new ProcessExecutor; $process = new ProcessExecutor;