Skip to content

Commit 0cddfcb

Browse files
CI and HHVM fixes (#347)
* Update .travis.yml * Skipped a couple of tests on HHVM
1 parent 188cc82 commit 0cddfcb

File tree

2 files changed

+34
-18
lines changed

2 files changed

+34
-18
lines changed

.travis.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
11
language: php
22

3-
php:
4-
- 5.6
5-
- 7.0
6-
- 7.1
7-
- 7.2
8-
- 7.3
9-
- 7.4
10-
- hhvm
11-
123
matrix:
13-
# See https://travis-ci.community/t/php-5-4-and-5-5-archives-missing/3723
144
include:
5+
- php: hhvm-3.24
6+
dist: trusty
157
- php: 5.4
168
dist: trusty
9+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
10+
- php: 5.4
11+
dist: trusty
12+
- php: 5.5.9
13+
dist: trusty
14+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
1715
- php: 5.5
1816
dist: trusty
17+
- php: 5.6
18+
dist: xenial
19+
- php: 7.0
20+
dist: xenial
21+
- php: 7.1
22+
dist: bionic
23+
- php: 7.2
24+
dist: bionic
25+
- php: 7.3
26+
dist: bionic
27+
- php: 7.4
28+
dist: bionic
1929
fast_finish: true
20-
allow_failures:
21-
- php: hhvm
2230

23-
cache:
24-
directories:
25-
- vendor
26-
- $HOME/.composer/cache
31+
before_install:
32+
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm-3.24" ]]; then echo "xdebug.overload_var_dump = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
33+
- if [[ "$TRAVIS_PHP_VERSION" == "hhvm-3.24" ]]; then travis_retry composer require "phpunit/phpunit:^5.7.27" --dev --no-update -n; fi
2734

2835
install:
29-
- travis_retry composer install --no-interaction --prefer-dist
36+
- travis_retry composer update --prefer-dist
3037

31-
script: make test
38+
script:
39+
- make test

tests/StreamTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ public function testConvertsToString()
6969

7070
public function testConvertsToStringNonSeekableStream()
7171
{
72+
if (defined('HHVM_VERSION')) {
73+
$this->markTestSkipped('This does not work on HHVM.');
74+
}
75+
7276
$handle = popen('echo foo', 'r');
7377
$stream = new Stream($handle);
7478
$this->assertFalse($stream->isSeekable());
@@ -77,6 +81,10 @@ public function testConvertsToStringNonSeekableStream()
7781

7882
public function testConvertsToStringNonSeekablePartiallyReadStream()
7983
{
84+
if (defined('HHVM_VERSION')) {
85+
$this->markTestSkipped('This does not work on HHVM.');
86+
}
87+
8088
$handle = popen('echo bar', 'r');
8189
$stream = new Stream($handle);
8290
$firstLetter = $stream->read(1);

0 commit comments

Comments
 (0)