diff --git a/.travis.yml b/.travis.yml index b3fafdf..37a14d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ php: - 5.5 - 5.6 - 7.0 +# - 7.0 # Mac OS X test setup, see below - 7.1 - nightly # ignore errors, see below - hhvm # ignore errors, see below @@ -17,11 +18,29 @@ matrix: include: - php: 5.3 dist: precise + include: + - os: osx + language: generic + php: 7.0 # just to look right on travis + env: + - PACKAGE: php70 allow_failures: - php: nightly - php: hhvm install: + # OSX install inspired by https://github.com/kiler129/TravisCI-OSX-PHP + - | + if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then + brew tap homebrew/homebrew-php + echo "Installing PHP ..." + brew install "${PACKAGE}" + brew install "${PACKAGE}"-xdebug + brew link "${PACKAGE}" + echo "Installing composer ..." + curl -s http://getcomposer.org/installer | php + mv composer.phar /usr/local/bin/composer + fi - composer install --no-interaction script: diff --git a/tests/DuplexResourceStreamIntegrationTest.php b/tests/DuplexResourceStreamIntegrationTest.php index 37d05da..f7f2860 100644 --- a/tests/DuplexResourceStreamIntegrationTest.php +++ b/tests/DuplexResourceStreamIntegrationTest.php @@ -248,7 +248,7 @@ public function testReadsMultipleChunksFromProcessPipe($condition, $loopFactory) $loop = $loopFactory(); - $stream = new ReadableResourceStream(popen('echo -n a;sleep 0.1;echo -n b;sleep 0.1;echo -n c', 'r'), $loop); + $stream = new ReadableResourceStream(popen('echo a;sleep 0.1;echo b;sleep 0.1;echo c', 'r'), $loop); $buffer = ''; $stream->on('data', function ($chunk) use (&$buffer) { @@ -260,7 +260,7 @@ public function testReadsMultipleChunksFromProcessPipe($condition, $loopFactory) $loop->run(); - $this->assertEquals('abc', $buffer); + $this->assertEquals("a\n" . "b\n" . "c\n", $buffer); } /**