Skip to content

Commit 25a1c27

Browse files
authored
Merge pull request #130 from clue-labs/macosx
Test Mac OS X on Travis
2 parents 2aad7ce + fc47d6c commit 25a1c27

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,30 @@ matrix:
1515
include:
1616
- php: 5.3
1717
dist: precise
18+
include:
19+
- os: osx
20+
language: generic
21+
php: 7.0 # just to look right on travis
22+
env:
23+
- PACKAGE: php70
1824
allow_failures:
1925
- php: hhvm
2026

2127
sudo: false
2228

2329
install:
30+
# OSX install inspired by https://github.com/kiler129/TravisCI-OSX-PHP
31+
- |
32+
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
33+
brew tap homebrew/homebrew-php
34+
echo "Installing PHP ..."
35+
brew install "${PACKAGE}"
36+
brew install "${PACKAGE}"-xdebug
37+
brew link "${PACKAGE}"
38+
echo "Installing composer ..."
39+
curl -s http://getcomposer.org/installer | php
40+
mv composer.phar /usr/local/bin/composer
41+
fi
2442
- COMPOSER_ROOT_VERSION=`git describe --abbrev=0` composer install --no-interaction
2543

2644
script:

tests/FunctionalSecureServerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ public function testEmitsErrorForConnectionWithPeerVerification()
326326

327327
public function testEmitsErrorIfConnectionIsCancelled()
328328
{
329+
if (PHP_OS !== 'Linux') {
330+
$this->markTestSkipped('Linux only (OS is ' . PHP_OS . ')');
331+
}
332+
329333
$loop = Factory::create();
330334

331335
$server = new TcpServer(0, $loop);

tests/FunctionalTcpServerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ public function testEmitsConnectionWithRemoteNullAddressAfterConnectionIsClosedL
165165

166166
public function testEmitsConnectionEvenIfConnectionIsCancelled()
167167
{
168+
if (PHP_OS !== 'Linux') {
169+
$this->markTestSkipped('Linux only (OS is ' . PHP_OS . ')');
170+
}
171+
168172
$loop = Factory::create();
169173

170174
$server = new TcpServer(0, $loop);

0 commit comments

Comments
 (0)