22
33namespace CodeZero \LocalizedRoutes \Tests \Feature \Macros \Route ;
44
5+ use PHPUnit \Framework \Attributes \Test ;
56use CodeZero \LocalizedRoutes \Tests \TestCase ;
67use Illuminate \Support \Facades \Config ;
78use Illuminate \Support \Facades \Route ;
89
9- class LocalizedMacroTest extends TestCase
10+ final class LocalizedMacroTest extends TestCase
1011{
11- /** @test */
12- public function it_registers_a_route_for_each_locale ()
12+ #[Test]
13+ public function it_registers_a_route_for_each_locale (): void
1314 {
1415 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
1516
@@ -35,8 +36,8 @@ public function it_registers_a_route_for_each_locale()
3536 $ this ->assertContains ('nl/route ' , $ uris );
3637 }
3738
38- /** @test */
39- public function it_registers_a_root_route_for_each_locale ()
39+ #[Test]
40+ public function it_registers_a_root_route_for_each_locale (): void
4041 {
4142 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
4243
@@ -58,8 +59,8 @@ public function it_registers_a_root_route_for_each_locale()
5859 $ this ->assertContains ('nl ' , $ uris );
5960 }
6061
61- /** @test */
62- public function it_registers_a_url_without_prefix_for_a_configured_main_locale ()
62+ #[Test]
63+ public function it_registers_a_url_without_prefix_for_a_configured_main_locale (): void
6364 {
6465 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
6566 $ this ->setOmittedLocale ('en ' );
@@ -82,8 +83,8 @@ public function it_registers_a_url_without_prefix_for_a_configured_main_locale()
8283 $ this ->assertContains ('nl/about ' , $ uris );
8384 }
8485
85- /** @test */
86- public function it_registers_routes_in_the_correct_order_without_prefix_for_a_configured_main_locale ()
86+ #[Test]
87+ public function it_registers_routes_in_the_correct_order_without_prefix_for_a_configured_main_locale (): void
8788 {
8889 $ this ->setSupportedLocales (['en ' , 'nl ' ]);
8990 $ this ->setOmittedLocale ('en ' );
@@ -99,8 +100,8 @@ public function it_registers_routes_in_the_correct_order_without_prefix_for_a_co
99100 );
100101 }
101102
102- /** @test */
103- public function it_maps_a_custom_slug_to_each_locale ()
103+ #[Test]
104+ public function it_maps_a_custom_slug_to_each_locale (): void
104105 {
105106 $ this ->setSupportedLocales ([
106107 'en ' => 'english ' ,
@@ -123,8 +124,8 @@ public function it_maps_a_custom_slug_to_each_locale()
123124 $ this ->assertEquals ('dutch ' , $ route ->uri );
124125 }
125126
126- /** @test */
127- public function it_registers_routes_in_the_correct_order_without_prefix_for_a_configured_main_locale_with_custom_slugs ()
127+ #[Test]
128+ public function it_registers_routes_in_the_correct_order_without_prefix_for_a_configured_main_locale_with_custom_slugs (): void
128129 {
129130 $ this ->setSupportedLocales ([
130131 'en ' => 'english ' ,
@@ -143,8 +144,8 @@ public function it_registers_routes_in_the_correct_order_without_prefix_for_a_co
143144 );
144145 }
145146
146- /** @test */
147- public function it_maps_a_custom_domain_to_each_locale ()
147+ #[Test]
148+ public function it_maps_a_custom_domain_to_each_locale (): void
148149 {
149150 $ this ->setSupportedLocales ([
150151 'en ' => 'english-domain.com ' ,
@@ -169,8 +170,8 @@ public function it_maps_a_custom_domain_to_each_locale()
169170 $ this ->assertEquals ('/ ' , $ route ->uri );
170171 }
171172
172- /** @test */
173- public function it_registers_routes_in_the_correct_order_without_prefix_for_a_configured_main_locale_with_domains ()
173+ #[Test]
174+ public function it_registers_routes_in_the_correct_order_without_prefix_for_a_configured_main_locale_with_domains (): void
174175 {
175176 $ this ->setSupportedLocales ([
176177 'en ' => 'english-domain.com ' ,
@@ -208,8 +209,8 @@ public function it_registers_routes_in_the_correct_order_without_prefix_for_a_co
208209 $ this ->assertEquals ('{slug} ' , $ route ->uri );
209210 }
210211
211- /** @test */
212- public function it_uses_scoped_config_options ()
212+ #[Test]
213+ public function it_uses_scoped_config_options (): void
213214 {
214215 $ this ->setSupportedLocales (['en ' ]);
215216 $ this ->setOmittedLocale (null );
0 commit comments