Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Mac OS X on Travis #112

Merged
merged 2 commits into from
Oct 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/DuplexResourceStreamIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -260,7 +260,7 @@ public function testReadsMultipleChunksFromProcessPipe($condition, $loopFactory)

$loop->run();

$this->assertEquals('abc', $buffer);
$this->assertEquals("a\n" . "b\n" . "c\n", $buffer);
}

/**
Expand Down