From df22fa04874f544b05e85133ddd8bb35ae5ba413 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 18 Dec 2020 21:29:09 -0600 Subject: [PATCH] add unit test for stream_select addition --- tests/Functional/Net/SFTPStreamTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Functional/Net/SFTPStreamTest.php b/tests/Functional/Net/SFTPStreamTest.php index 5388269a..97dce6f7 100644 --- a/tests/Functional/Net/SFTPStreamTest.php +++ b/tests/Functional/Net/SFTPStreamTest.php @@ -55,6 +55,20 @@ class Functional_Net_SFTPStreamTest extends Functional_Net_SFTPTestCase $this->assertEquals(['.', '..'], array_slice($dirs, 0, 2)); } + /** + * @group github1552 + */ + public function testStreamSelect() + { + $context = stream_context_create([ + 'sftp' => ['session' => $this->sftp], + ]); + $fp = fopen($this->buildUrl('fooo.txt'), 'wb', false, $context); + $read = [$fp]; + $write = $except = null; + stream_select($read, $write, $except, 0); + } + protected function buildUrl($suffix) { return sprintf(