From f9423abd007bf229b8f13455834e3b36c6e0e7eb Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 7 Dec 2018 15:01:37 +0100 Subject: [PATCH] Fix tests on hhvm --- src/Stream.php | 2 +- tests/StreamTest.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Stream.php b/src/Stream.php index 23311043..7b969942 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -19,7 +19,7 @@ class Stream implements StreamInterface * @see http://php.net/manual/en/function.gzopen.php */ const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/'; - const WRITABLE_MODES = '/a|w|r\+|rw|x|c/'; + const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/'; private $stream; private $size; diff --git a/tests/StreamTest.php b/tests/StreamTest.php index 7844c55b..a100ebd7 100644 --- a/tests/StreamTest.php +++ b/tests/StreamTest.php @@ -241,6 +241,10 @@ public function testStreamReadingFreadError() */ public function testGzipStreamModes($mode, $readable, $writable) { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('This does not work on HHVM.'); + } + $r = gzopen('php://temp', $mode); $stream = new Stream($r);