mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-30 04:39:02 +01:00
Updated unit tests
This commit is contained in:
parent
628949fb73
commit
794fcb7ee8
@ -6,6 +6,8 @@
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
*/
|
||||
|
||||
use phpseclib\Net\SFTP;
|
||||
|
||||
class Functional_Net_SFTPLargeFileTest extends PhpseclibFunctionalTestCase
|
||||
{
|
||||
protected $sftp;
|
||||
@ -30,7 +32,7 @@ class Functional_Net_SFTPLargeFileTest extends PhpseclibFunctionalTestCase
|
||||
{
|
||||
$this->scratchDir = uniqid('phpseclib-sftp-large-scratch-');
|
||||
|
||||
$this->sftp = new Net_SFTP($this->getEnv('SSH_HOSTNAME'));
|
||||
$this->sftp = new SFTP($this->getEnv('SSH_HOSTNAME'));
|
||||
$this->assertTrue($this->sftp->login(
|
||||
$this->getEnv('SSH_USERNAME'),
|
||||
$this->getEnv('SSH_PASSWORD')
|
||||
@ -59,7 +61,7 @@ class Functional_Net_SFTPLargeFileTest extends PhpseclibFunctionalTestCase
|
||||
$filename = 'file-large-from-local.txt';
|
||||
|
||||
$this->assertTrue(
|
||||
$this->sftp->put($filename, $tmp_filename, Net_SFTP::SOURCE_LOCAL_FILE),
|
||||
$this->sftp->put($filename, $tmp_filename, SFTP::SOURCE_LOCAL_FILE),
|
||||
'Failed asserting that local file could be successfully put().'
|
||||
);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
*/
|
||||
|
||||
use phpseclib\System\SSH\Agent;
|
||||
use phpseclib\Net\SSH2;
|
||||
|
||||
class Functional_Net_SSH2AgentTest extends PhpseclibFunctionalTestCase
|
||||
{
|
||||
@ -22,8 +22,8 @@ class Functional_Net_SSH2AgentTest extends PhpseclibFunctionalTestCase
|
||||
|
||||
public function testAgentLogin()
|
||||
{
|
||||
$ssh = new Net_SSH2($this->getEnv('SSH_HOSTNAME'));
|
||||
$agent = new Agent;
|
||||
$ssh = new SSH2($this->getEnv('SSH_HOSTNAME'));
|
||||
$agent = new System_SSH_Agent;
|
||||
|
||||
$this->assertTrue(
|
||||
$ssh->login($this->getEnv('SSH_USERNAME'), $agent),
|
||||
|
Loading…
Reference in New Issue
Block a user