Browse Source

macOS fixes

microsub
J. King 7 years ago
parent
commit
adfb22e922
  1. 2
      lib/Feed.php
  2. 4
      tests/test
  3. 2
      tests/test.bat

2
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

4
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

2
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 (

Loading…
Cancel
Save