-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
- Localization Version: 2.1.0
- Laravel Version: 5.5.22
- PHP Version: 7.1.8-1ubuntu1
Description:
I cannot test multilanguage translated routes. Created routes work in the browser, but never in a testcase. Tried it using a empty Laravel-project, which doesn't work either. I'd like to start a PR, but I have no clue where to start at this point in time.
Steps To Reproduce:
- Create a new, empty Laravel project:
composer create-project --prefer-dist laravel/laravel loctest
- Require the localization package
composer require "arcanedev/localization:^2.1" - Publish the configuration file
php artisan vendor:publish --provider="Arcanedev\Localization\LocalizationServiceProvider" - Change
routes/web.phpto:Route::localizedGroup(function () { Route::view('/', 'welcome'); });
- Change the test method in
tests/Feature/ExampleTest.phpto:public function testBasicTest() { $response = $this->get('/en'); $response->assertStatus(200); }
- Run the tests:
vendor/bin/phpunit.
Expected
No changes in the testcase
Happened
PHPUnit 6.4.4 by Sebastian Bergmann and contributors.
F. 2 / 2 (100%)
Time: 73 ms, Memory: 12.00MB
There was 1 failure:
1) Tests\Feature\ExampleTest::testBasicTest
Expected status code 200 but received 404.
Failed asserting that false is true.
/home/jakob/code/loctest/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:78
/home/jakob/code/loctest/tests/Feature/ExampleTest.php:19