1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-30 04:39:02 +01:00

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') ->method('callbackMethod')
->will($this->returnValue(true)); ->will($this->returnValue(true));
$ssh->exec('pwd', array($callbackObject, 'callbackMethod')); $ssh->exec('pwd', array($callbackObject, 'callbackMethod'));
return $ssh;
} }
public function testGetServerPublicHostKey() public function testGetServerPublicHostKey()
@ -133,4 +135,16 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase
'SSH2 login using an open socket failed.' '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');
}
} }