{"action":"created","issue":{"url":"https://api.github.com/repos/mcamara/laravel-localization/issues/161","labels_url":"https://api.github.com/repos/mcamara/laravel-localization/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/mcamara/laravel-localization/issues/161/comments","events_url":"https://api.github.com/repos/mcamara/laravel-localization/issues/161/events","html_url":"https://github.com/mcamara/laravel-localization/issues/161","id":53308700,"number":161,"title":"Unit testing localized routes","user":{"login":"leonardoalifraco","id":2942943,"avatar_url":"https://avatars.githubusercontent.com/u/2942943?v=3","gravatar_id":"","url":"https://api.github.com/users/leonardoalifraco","html_url":"https://github.com/leonardoalifraco","followers_url":"https://api.github.com/users/leonardoalifraco/followers","following_url":"https://api.github.com/users/leonardoalifraco/following{/other_user}","gists_url":"https://api.github.com/users/leonardoalifraco/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardoalifraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardoalifraco/subscriptions","organizations_url":"https://api.github.com/users/leonardoalifraco/orgs","repos_url":"https://api.github.com/users/leonardoalifraco/repos","events_url":"https://api.github.com/users/leonardoalifraco/events{/privacy}","received_events_url":"https://api.github.com/users/leonardoalifraco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-03T16:43:19Z","updated_at":"2015-05-18T21:14:08Z","closed_at":null,"body":"Hello,\r\n\r\nI'm trying to unit test calling to localized routes with a very simple test, but it is not working. I guess it is because the routes are loaded with the default prefix just one time on the testing flow.\r\n\r\nOn a browser, when the routes.php is excecuted for every request, everything works fine.\r\n\r\nIs this an expected behaviour?\r\nAm i doing something wrong?\r\nAm i supposed to test this?\r\n\r\nHere is the code of the test:\r\n\r\n```php\r\nclass ExampleTest extends TestCase {\r\n\r\n\t/**\r\n\t * A basic functional test example.\r\n\t *\r\n\t * @return void\r\n\t */\r\n\tpublic function testBasicExample()\r\n\t{\r\n\t\t$crawler = $this->client->request('GET', '/');\r\n\r\n\t\t$this->assertTrue($this->client->getResponse()->isOk());\r\n\t}\r\n\r\n\t/**\r\n\t * A basic functional test example with language.\r\n\t *\r\n\t * @return void\r\n\t */\r\n\tpublic function testBasicExampleWithLanguage()\r\n\t{\r\n\t\t$crawler = $this->client->request('GET', '/es');\r\n\r\n\t\t$this->assertTrue($this->client->getResponse()->isOk());\r\n\t}\r\n\r\n}\r\n```\r\n\r\nAnd here is the error i'm getting when excecuting phpunit:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/2942943/5602970/2cfbf042-934e-11e4-8ed2-dfdb68fa243c.png)\r\n\r\n\r\nMy routes.php is:\r\n\r\n```php\r\nRoute::group(array('prefix' => LaravelLocalization::setLocale(), \r\n                   'before' => 'LaravelLocalizationRedirectFilter'), function()\r\n{\r\n    Route::get('/', function() {\r\n        return 'home';\r\n    });\r\n\r\n    Route::get('test',function(){\r\n        return 'test';\r\n    });\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/mcamara/laravel-localization/issues/comments/103213020","html_url":"https://github.com/mcamara/laravel-localization/issues/161#issuecomment-103213020","issue_url":"https://api.github.com/repos/mcamara/laravel-localization/issues/161","id":103213020,"user":{"login":"osaris","id":125797,"avatar_url":"https://avatars.githubusercontent.com/u/125797?v=3","gravatar_id":"","url":"https://api.github.com/users/osaris","html_url":"https://github.com/osaris","followers_url":"https://api.github.com/users/osaris/followers","following_url":"https://api.github.com/users/osaris/following{/other_user}","gists_url":"https://api.github.com/users/osaris/gists{/gist_id}","starred_url":"https://api.github.com/users/osaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osaris/subscriptions","organizations_url":"https://api.github.com/users/osaris/orgs","repos_url":"https://api.github.com/users/osaris/repos","events_url":"https://api.github.com/users/osaris/events{/privacy}","received_events_url":"https://api.github.com/users/osaris/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T21:14:08Z","updated_at":"2015-05-18T21:14:08Z","body":"+1 this is really annoying to have all tests broken due to this package :-("}}