Welcome Guest, Not a member yet? Register   Sign In
Unit Testing - FeatureTest
#2

Hi;

I've managed to make it work by changing the below:

Code:
1) $result = $this->call('get', 'home/index');

2) Changed in the phpunit.xml - <server name="app.baseURL" value="http://localhost"/>

Seems like the $path parameter on the call() is expecting "Controller/Method" instead of site URL (like documentation sample). One more thing, if you're using '.env' file, the app.BaseURL from .env file will take precedence. Also found that leave the app.BaseURL to empty ("") will work as well. 

Hope this help!
Reply


Messages In This Thread
Unit Testing - FeatureTest - by gordonblue - 06-04-2020, 11:28 AM
RE: Unit Testing - FeatureTest - by gordonblue - 06-08-2020, 09:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB