mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-09-22 04:29:01 +00:00
SSH2: add unit test for getServerPublicHostKey
This commit is contained in:
parent
5f56781261
commit
bbce7c4762
@ -58,4 +58,16 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase
|
|||||||
->will($this->returnValue(true));
|
->will($this->returnValue(true));
|
||||||
$ssh->exec('pwd', array($callbackObject, 'callbackMethod'));
|
$ssh->exec('pwd', array($callbackObject, 'callbackMethod'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetServerPublicHostKey()
|
||||||
|
{
|
||||||
|
$ssh = new Net_SSH2($this->getEnv('SSH_HOSTNAME'));
|
||||||
|
|
||||||
|
$this->assertTrue(
|
||||||
|
is_object($ssh),
|
||||||
|
'Could not construct NET_SSH2 object.'
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->assertInternalType('string', $ssh->getServerPublicHostKey());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user