5
5
namespace Tests \Concerns ;
6
6
7
7
use Closure ;
8
- use LaravelLang \Routes \Middlewares \CookiesLocale ;
9
- use LaravelLang \Routes \Middlewares \HeaderLocale ;
10
- use LaravelLang \Routes \Middlewares \ParameterLocale ;
11
- use LaravelLang \Routes \Middlewares \ParameterRedirectLocale ;
12
- use LaravelLang \Routes \Middlewares \SessionLocale ;
8
+ use LaravelLang \Routes \Middlewares \LocalizationByCookie ;
9
+ use LaravelLang \Routes \Middlewares \LocalizationByHeader ;
10
+ use LaravelLang \Routes \Middlewares \LocalizationByParameter ;
11
+ use LaravelLang \Routes \Middlewares \LocalizationByParameterWithRedirect ;
12
+ use LaravelLang \Routes \Middlewares \LocalizationBySession ;
13
13
use Tests \Constants \LocaleValue ;
14
14
15
15
use function app ;
@@ -24,31 +24,31 @@ public function setUpRoutes(): void
24
24
->middleware ('web ' )
25
25
->group (function () {
26
26
app ('router ' )
27
- ->middleware (ParameterLocale ::class)
27
+ ->middleware (LocalizationByParameter ::class)
28
28
->get ('path/{foo}/{locale?} ' , $ this ->jsonResponse ())
29
29
->name ('via.parameter ' );
30
30
31
31
app ('router ' )
32
- ->middleware (ParameterRedirectLocale ::class)
32
+ ->middleware (LocalizationByParameterWithRedirect ::class)
33
33
->get ('redirect/{foo}/{locale?} ' , $ this ->jsonResponse ())
34
34
->name ('via.parameter.redirect ' );
35
35
36
36
app ('router ' )
37
- ->middleware (ParameterRedirectLocale ::class)
37
+ ->middleware (LocalizationByParameterWithRedirect ::class)
38
38
->get ('not-named/redirect/{foo}/{locale?} ' , $ this ->jsonResponse ());
39
39
40
40
app ('router ' )
41
- ->middleware (HeaderLocale ::class)
41
+ ->middleware (LocalizationByHeader ::class)
42
42
->get ('header/{foo} ' , $ this ->jsonResponse ())
43
43
->name ('via.header ' );
44
44
45
45
app ('router ' )
46
- ->middleware (CookiesLocale ::class)
46
+ ->middleware (LocalizationByCookie ::class)
47
47
->get ('cookie/{foo} ' , $ this ->jsonResponse ())
48
48
->name ('via.cookie ' );
49
49
50
50
app ('router ' )
51
- ->middleware (SessionLocale ::class)
51
+ ->middleware (LocalizationBySession ::class)
52
52
->get ('session/{foo} ' , $ this ->jsonResponse ())
53
53
->name ('via.session ' );
54
54
});
0 commit comments