mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-15 17:57:12 +00:00
Tests for bug280.
This commit is contained in:
parent
60e2bfc073
commit
90ff32d56d
@ -41,5 +41,21 @@ class Net_SSH2FunctionalTest extends PhpseclibFunctionalTestCase
|
|||||||
$ssh->login($username, $password),
|
$ssh->login($username, $password),
|
||||||
'SSH2 login using password failed.'
|
'SSH2 login using password failed.'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return $ssh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testPasswordLogin
|
||||||
|
* @group bug280
|
||||||
|
*/
|
||||||
|
public function testExecWithMethodCallback($ssh)
|
||||||
|
{
|
||||||
|
$callbackObject = $this->getMock('stdClass', array('callbackMethod'));
|
||||||
|
$callbackObject
|
||||||
|
->expects($this->atLeastOnce())
|
||||||
|
->method('callbackMethod')
|
||||||
|
->will($this->returnValue(true));
|
||||||
|
$ssh->exec('ls', array($callbackObject, 'callbackMethod'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user