From ed3846a7a2d07c5aef4e60706040ff3f8d776186 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 6 Sep 2017 00:27:07 -0500 Subject: [PATCH] Tests/SSH2: add unit test for #1167 --- tests/Functional/Net/SSH2Test.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/Functional/Net/SSH2Test.php b/tests/Functional/Net/SSH2Test.php index 097c68a8..728e0bdd 100644 --- a/tests/Functional/Net/SSH2Test.php +++ b/tests/Functional/Net/SSH2Test.php @@ -146,5 +146,25 @@ class Functional_Net_SSH2Test extends PhpseclibFunctionalTestCase $ssh->exec('ls -latr'); $ssh->disablePTY(); $ssh->exec('pwd'); + + return $ssh; + } + + /** + * @depends testDisablePTY + * @group github1167 + */ + public function testChannelDataAfterOpen($ssh) + { + $ssh->write("ping 127.0.0.1\n"); + + $ssh->enablePTY(); + $ssh->exec('bash'); + + $ssh->write("ls -latr\n"); + + $ssh->setTimeout(1); + + $ssh->read(); } }