I am trying to do functional testing. It works perfectly fine locally, my setup is like this:
phpunit
guzzle
In the test I do calls via guzzle and check the results. All fine.
However on travis I can not get it to work. I tried using and ENV variable TEST_BASE_URL to set the url (api.test.app) for my local test works fine, but with http://localhost on travis or http://localhost:8000 it get a curl error
(7) cannot connect to host exception.
Okay, I got this one working. Now guzzle gives me a 500 error. Could it be that the lumen routing does not work, because the httaccess file does not work on travis?
Travis doesn't support a web browser without you telling it to start one. Without you telling me more about how you are trying to run your tests I can't really help you.
E[Sat Aug 22 11:39:02 2015] ::1:41491 [500]: /jsonapi
So the server is starting, I guess the routing is not working? But its just a guess, no evidence. Do I need to do something for the routing to work on travis?
As willvincent point out the PHP server doesn't support .htaccess for the routes. If you want to directly call the PHP in-build server command you need to tell it to use the router script php -S localhost:8000 -t public server.php or you can use the php artisan serve command which handles everything for you.