mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Merge branch 'master' into php5
* master: Add a few SSH2 preLogin tests.
This commit is contained in:
commit
9fadfcc1ad
@ -32,6 +32,36 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase
|
||||
|
||||
/**
|
||||
* @depends testConstructor
|
||||
* @group github408
|
||||
* @group github412
|
||||
*/
|
||||
public function testPreLogin($ssh)
|
||||
{
|
||||
$this->assertFalse(
|
||||
$ssh->isConnected(),
|
||||
'Failed asserting that SSH2 is not connected after construction.'
|
||||
);
|
||||
|
||||
$this->assertNotEmpty(
|
||||
$ssh->getServerPublicHostKey(),
|
||||
'Failed asserting that a non-empty public host key was fetched.'
|
||||
);
|
||||
|
||||
$this->assertTrue(
|
||||
$ssh->isConnected(),
|
||||
'Failed asserting that SSH2 is connected after public key fetch.'
|
||||
);
|
||||
|
||||
$this->assertNotEmpty(
|
||||
$ssh->getServerIdentification(),
|
||||
'Failed asserting that the server identifier was set after connect.'
|
||||
);
|
||||
|
||||
return $ssh;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testPreLogin
|
||||
*/
|
||||
public function testPasswordLogin($ssh)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user