22
33namespace CodeZero \Localizer \Tests \Feature ;
44
5+ use PHPUnit \Framework \Attributes \Test ;
56use CodeZero \BrowserLocale \BrowserLocale ;
67use CodeZero \Localizer \Middleware \SetLocale ;
78use CodeZero \Localizer \Tests \TestCase ;
@@ -33,7 +34,7 @@ protected function setUp(): void
3334 $ this ->cookieName = Config::get ('localizer.cookie_name ' );
3435 }
3536
36- /** @test */
37+ #[Test]
3738 public function it_looks_for_a_locale_in_a_custom_route_action ()
3839 {
3940 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -54,7 +55,7 @@ public function it_looks_for_a_locale_in_a_custom_route_action()
5455 $ this ->assertEquals ('nl ' , $ response ->original );
5556 }
5657
57- /** @test */
58+ #[Test]
5859 public function it_looks_for_a_locale_in_the_url ()
5960 {
6061 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -71,7 +72,7 @@ public function it_looks_for_a_locale_in_the_url()
7172 $ this ->assertEquals ('nl ' , $ response ->original );
7273 }
7374
74- /** @test */
75+ #[Test]
7576 public function you_can_configure_which_segment_to_use_as_locale ()
7677 {
7778 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -90,7 +91,7 @@ public function you_can_configure_which_segment_to_use_as_locale()
9091 $ this ->assertEquals ('nl ' , $ response ->original );
9192 }
9293
93- /** @test */
94+ #[Test]
9495 public function it_looks_for_custom_slugs ()
9596 {
9697 $ this ->setSupportedLocales ([
@@ -110,7 +111,7 @@ public function it_looks_for_custom_slugs()
110111 $ this ->assertEquals ('nl ' , $ response ->original );
111112 }
112113
113- /** @test */
114+ #[Test]
114115 public function you_can_use_multiple_slugs_for_a_locale ()
115116 {
116117 $ this ->setSupportedLocales ([
@@ -140,7 +141,7 @@ public function you_can_use_multiple_slugs_for_a_locale()
140141 $ this ->assertEquals ('nl ' , $ response ->original );
141142 }
142143
143- /** @test */
144+ #[Test]
144145 public function it_looks_for_custom_domains ()
145146 {
146147 $ this ->setSupportedLocales ([
@@ -162,7 +163,7 @@ public function it_looks_for_custom_domains()
162163 $ this ->assertEquals ('nl ' , $ response ->original );
163164 }
164165
165- /** @test */
166+ #[Test]
166167 public function you_can_use_multiple_domains_for_a_locale ()
167168 {
168169 $ this ->setSupportedLocales ([
@@ -196,7 +197,7 @@ public function you_can_use_multiple_domains_for_a_locale()
196197 $ this ->assertEquals ('nl ' , $ response ->original );
197198 }
198199
199- /** @test */
200+ #[Test]
200201 public function it_checks_for_a_configured_omitted_locale ()
201202 {
202203 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -215,7 +216,7 @@ public function it_checks_for_a_configured_omitted_locale()
215216 $ this ->assertEquals ('nl ' , $ response ->original );
216217 }
217218
218- /** @test */
219+ #[Test]
219220 public function it_looks_for_a_locale_on_the_authenticated_user ()
220221 {
221222 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -236,7 +237,7 @@ public function it_looks_for_a_locale_on_the_authenticated_user()
236237 $ this ->assertEquals ('nl ' , $ response ->original );
237238 }
238239
239- /** @test */
240+ #[Test]
240241 public function it_will_bypass_missing_attribute_exception_if_the_locale_attribute_is_missing_on_the_user_model ()
241242 {
242243 if (version_compare (App::version (), '9.35.0 ' ) === -1 ) {
@@ -261,7 +262,7 @@ public function it_will_bypass_missing_attribute_exception_if_the_locale_attribu
261262 $ this ->assertEquals ('en ' , $ response ->original );
262263 }
263264
264- /** @test */
265+ #[Test]
265266 public function it_looks_for_a_locale_in_the_session ()
266267 {
267268 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -280,7 +281,7 @@ public function it_looks_for_a_locale_in_the_session()
280281 $ this ->assertEquals ('nl ' , $ response ->original );
281282 }
282283
283- /** @test */
284+ #[Test]
284285 public function it_looks_for_a_locale_in_a_cookie ()
285286 {
286287 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -300,7 +301,7 @@ public function it_looks_for_a_locale_in_a_cookie()
300301 $ this ->assertEquals ('nl ' , $ response ->original );
301302 }
302303
303- /** @test */
304+ #[Test]
304305 public function it_looks_for_a_locale_in_the_browser ()
305306 {
306307 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -319,7 +320,7 @@ public function it_looks_for_a_locale_in_the_browser()
319320 $ this ->assertEquals ('nl ' , $ response ->original );
320321 }
321322
322- /** @test */
323+ #[Test]
323324 public function it_returns_the_best_match_when_a_browser_locale_is_used ()
324325 {
325326 $ this ->setSupportedLocales (['en ' , 'nl ' , 'fr ' ]);
@@ -338,7 +339,7 @@ public function it_returns_the_best_match_when_a_browser_locale_is_used()
338339 $ this ->assertEquals ('nl ' , $ response ->original );
339340 }
340341
341- /** @test */
342+ #[Test]
342343 public function it_looks_for_the_current_app_locale ()
343344 {
344345 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
@@ -355,7 +356,7 @@ public function it_looks_for_the_current_app_locale()
355356 $ this ->assertEquals ('nl ' , $ response ->original );
356357 }
357358
358- /** @test */
359+ #[Test]
359360 public function trusted_detectors_ignore_supported_locales_and_may_set_any_locale ()
360361 {
361362 $ this ->setSupportedLocales (['en ' ]);
0 commit comments