Tests/SSH2: add unit test for #1009

This commit is contained in:
terrafrost 2017-05-28 08:58:00 -05:00
parent 83514e3991
commit 9bccc01b97

View File

@ -112,6 +112,8 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase
->method('callbackMethod')
->will($this->returnValue(true));
$ssh->exec('pwd', array($callbackObject, 'callbackMethod'));
return $ssh;
}
public function testGetServerPublicHostKey()
@ -133,4 +135,16 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase
'SSH2 login using an open socket failed.'
);
}
/**
* @depends testExecWithMethodCallback
* @group github1009
*/
public function testDisablePTY($ssh)
{
$ssh->enablePTY();
$ssh->exec('ls -latr');
$ssh->disablePTY();
$ssh->exec('pwd');
}
}