I'm learning to build some PHPUnit tests. My app redirects to default language when no prefix is used, for instance: www.myapp.com has 301 redirect to www.myapp.com/en, while www.myapp.com/en has a 200 OK.
Trying to make tests to my Controller, i have the following code
$response = $this->action('GET', 'HomeController@index');
$this->assertEquals(200, $response->getStatusCode());
The response is 301 (because of this language prefix check). How can I test these controllers with prefix ? Thanks