Browse Source

add test exposing the problem

Rob Bast 8 năm trước cách đây
mục cha
commit
b4fd19aae4
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      tests/Composer/Test/Util/ProcessExecutorTest.php

+ 7 - 1
tests/Composer/Test/Util/ProcessExecutorTest.php

@@ -54,10 +54,16 @@ class ProcessExecutorTest extends TestCase
     {
         $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);
-
         $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()
     {
         $process = new ProcessExecutor;