mirror of
https://github.com/danog/tgseclib.git
synced 2024-12-02 09:37:45 +01:00
36 lines
837 B
PHP
36 lines
837 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @author Andreas Fischer <bantu@phpbb.com>
|
||
|
* @copyright MMXIV Andreas Fischer
|
||
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||
|
*/
|
||
|
|
||
|
class Net_SSH2FunctionalTest extends PhpseclibFunctionalTestCase
|
||
|
{
|
||
|
public function testConstructor()
|
||
|
{
|
||
|
$ssh = new Net_SSH2($this->getEnv('SSH_HOSTNAME'));
|
||
|
|
||
|
$this->assertTrue(
|
||
|
is_object($ssh),
|
||
|
'Could not construct NET_SSH2 object.'
|
||
|
);
|
||
|
|
||
|
return $ssh;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @depends testConstructor
|
||
|
*/
|
||
|
public function testPasswordLogin($ssh)
|
||
|
{
|
||
|
$username = $this->getEnv('SSH_USERNAME');
|
||
|
$password = $this->getEnv('SSH_PASSWORD');
|
||
|
$this->assertTrue(
|
||
|
$ssh->login($username, $password),
|
||
|
'SSH2 login using password failed.'
|
||
|
);
|
||
|
}
|
||
|
}
|