I am trying to test the routing mechanism of my app (which is a Laravel PHP App) that was based on the documentation (http://laravel.com/docs/routing#route-prefixing). The case is: We are trying to handle the app localisation based on the route, for example:
www.example.com/en/something -> Should use EN as language,
www.example.com/es/something -> Should use ES as language,
www.example.com/de/something -> Should use DE as language.
We accomplished the behaviour described before by using prefixes and it works perfect. The thing is that I am not able to write tests to test this behaviour. I did a little bit of research, and I found this third party library (https://github.com/mcamara/laravel-localization/blob/master/tests/LocalizerTests.php), that uses a similar approach, and I think it might help you understand which is the situation.
If you take a look in there, he is not testing the scenario that I want to test (I mean, with the locale code on the path).Btw: I've already turned on the filters with Route::enableFilters() and it does not work :(
Thanks a lot
/*** A basic functional test example.** @return void*/public function testBasicExample(){$crawler = $this->client->request('GET', '/myproduct/en/list');$this->assertTrue($this->client->getResponse()->isOk());}And this is throwing the following exception: 1) ExampleTest::testBasicExample Symfony\Component\HttpKernel\Exception\NotFoundHttpException: - facundofarias