Support colon notation in host config definition

This commit is contained in:
ivand
2017-07-05 12:57:22 +02:00
parent 280f48cd18
commit 3a2c00dbcb
2 changed files with 27 additions and 2 deletions
+14
View File
@@ -119,6 +119,20 @@ class RuntimeTest extends TestCase
$this->assertEquals('-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no', $sshConfig['flags']);
}
public function testSSHConfigPortDefinedInHostNotation()
{
$runtime = new Runtime();
$runtime->setWorkingHost('223.12.24.64:1056');
$sshConfig = $runtime->getSSHConfig();
$this->assertEquals('1056', $sshConfig['port']);
$runtime->setWorkingHost('223.12.24.64');
$sshConfig = $runtime->getSSHConfig();
$this->assertEquals('22', $sshConfig['port']);
}
public function testSSHConfigEmptyOptions()
{
$runtime = new Runtime();