1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-27 04:34:45 +01:00

Tests for bug280.

This commit is contained in:
Andreas Fischer 2014-03-06 11:35:54 +01:00
parent 60e2bfc073
commit 90ff32d56d

View File

@ -41,5 +41,21 @@ class Net_SSH2FunctionalTest extends PhpseclibFunctionalTestCase
$ssh->login($username, $password),
'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'));
}
}