From adfb22e92224d7832149bb1f5f520907e1d75d00 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sun, 21 May 2017 21:49:54 -0400 Subject: [PATCH] macOS fixes --- lib/Feed.php | 2 +- tests/test | 4 ++-- tests/test.bat | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Feed.php b/lib/Feed.php index 9119912f..324cbf5d 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -69,7 +69,7 @@ class Feed { // used instead of the feed's url. $this->favicon = (new Favicon)->find($feed->siteUrl); } catch (PicoFeedException $e) { - throw new Feed\Exception($url, $e); + throw new Feed\Exception($this->resource->getUrl(), $e); } // PicoFeed does not provide valid ids when there is no id element. Its solution diff --git a/tests/test b/tests/test index 809959cc..4e18ac21 100644 --- a/tests/test +++ b/tests/test @@ -1,7 +1,7 @@ #! /bin/sh base=`dirname "$0"` -php -S localhost:8000 "$base/server.php" >/dev/null & +php -n -S localhost:8000 "$base/server.php" >/dev/null & php "$base/../vendor/phpunit/phpunit/phpunit" -c "$base/phpunit.xml" sleep 1s -pid=`netstat -tlpn 2>/dev/null | grep ":8000 " | grep -Eo "[0-9]+/php" | grep -Eo "[0-9]+"` +pid=`lsof -n -i:8000 | grep -Eo "php\s+[0-9]+" | grep -Eo "[0-9]+"` kill $pid \ No newline at end of file diff --git a/tests/test.bat b/tests/test.bat index 0392fdb5..21ff7fd4 100644 --- a/tests/test.bat +++ b/tests/test.bat @@ -1,7 +1,7 @@ @echo off setlocal set base=%~dp0 -start /b php -S localhost:8000 "%base%\server.php" >nul +start /b php -n -S localhost:8000 "%base%\server.php" >nul php "%base%\..\vendor\phpunit\phpunit\phpunit" -c "%base%\phpunit.xml" timeout /nobreak /t 1 >nul for /f "usebackq tokens=5" %%a in (`netstat -aon ^| find "LISTENING" ^| find ":8000"`) do (