From 3eab476a680d0d5247f83022c6b00d3ddba54838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 23 Sep 2020 12:00:36 +0200 Subject: [PATCH] Add non-symlink case to bin/http_test_server see php-http/client-integration-tests#46 --- bin/http_test_server | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/http_test_server b/bin/http_test_server index fd80cb5..cadecf2 100755 --- a/bin/http_test_server +++ b/bin/http_test_server @@ -8,7 +8,10 @@ if [ -f "$DIR/../autoload.php" ]; then # Development elif [ -f "$DIR/../vendor/autoload.php" ]; then php -S 127.0.0.1:10000 -t "$DIR/../fixture" -# Not working, e.g. windows which does not do symlinks +# Installed as a dependency, but not accessed using the symlink (e.g. Windows) +elif [ -f "$DIR/../composer.json" -a -f "$DIR/../fixture/server.php" ] && grep -q php-http/client-integration-tests "$DIR/../composer.json"; then + php -S 127.0.0.1:10000 -t "$DIR/../fixture" +# Not working else echo "*** Can't find the fixture folder ***" >&2 echo "Please write your own way to start a PHP web server on port 10000 for the 'fixture' directory." >&2