Tests for bug280.

This commit is contained in:
Andreas Fischer 2014-03-06 11:35:54 +01:00
parent 60e2bfc073
commit 90ff32d56d
1 changed files with 16 additions and 0 deletions

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'));
}
}