I have project A and project B in my vagrant machine. Both working and accessible via http://a.local/ and http//b.local/ . These are Apigility APIs.
I am now writing tests with PHPUnit. I want to test that project A can call services on project B and check that:
Response code is 200.
Response is JSON.
etc...
PHPUnit keeps on failing because the response is 404 when calling any service (from a to b or from b to a):
{404 => string(54) "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" 'title' => string(9) "Not Found" 'status' => int(404) 'detail' => string(15) "Page not found."}
All URLs are accesible via browser.
All URLs are accesible via Curl.
Browser and Curl return the same (identical) responses and http codes.
/etc/hosts file is properly configured.
PHP.ini file are identical for cli and fmp.
Any ideas what am I doing wrong? Thanks!