33namespace Tests ;
44
55use Illuminate \Filesystem \Filesystem ;
6+ use PHPUnit \Framework \Attributes \Test ;
67use Statamic \Facades \Config ;
78use Statamic \Facades \URL ;
89use Tests \Concerns \RunsGeneratorCommand ;
@@ -19,7 +20,7 @@ protected function tearDown(): void
1920 parent ::tearDown ();
2021 }
2122
22- /** @test */
23+ #[Test]
2324 public function it_generates_pages_for_site_fixture ()
2425 {
2526 $ files = $ this ->generate ();
@@ -68,7 +69,7 @@ public function it_generates_pages_for_site_fixture()
6869 $ this ->assertStringContainsString ('<h1>Article Title: Eight</h1> ' , $ files ['articles/eight/index.html ' ]);
6970 }
7071
71- /** @test */
72+ #[Test]
7273 public function it_generates_specific_pages_when_passing_urls_as_args ()
7374 {
7475 $ this
@@ -92,7 +93,7 @@ public function it_generates_specific_pages_when_passing_urls_as_args()
9293 $ this ->assertStringContainsString ('<h1>Articles Index Page Title</h1> ' , $ files ['articles/index.html ' ]);
9394 }
9495
95- /** @test */
96+ #[Test]
9697 public function it_generates_pages_to_custom_destination ()
9798 {
9899 Config::set ('statamic.ssg.destination ' , $ this ->destination = base_path ('custom_export ' ));
@@ -105,7 +106,7 @@ public function it_generates_pages_to_custom_destination()
105106 $ this ->cleanUpDestination ();
106107 }
107108
108- /** @test */
109+ #[Test]
109110 public function it_clears_destination_directory_when_generating_site ()
110111 {
111112 $ this
@@ -117,7 +118,7 @@ public function it_clears_destination_directory_when_generating_site()
117118 $ this ->generate ();
118119 }
119120
120- /** @test */
121+ #[Test]
121122 public function it_can_generate_site_without_clearing_destination_directory ()
122123 {
123124 $ this
@@ -129,7 +130,7 @@ public function it_can_generate_site_without_clearing_destination_directory()
129130 $ this ->generate (['--disable-clear ' => true ]);
130131 }
131132
132- /** @test */
133+ #[Test]
133134 public function it_generates_paginated_pages ()
134135 {
135136 $ this ->files ->put (resource_path ('views/articles/index.antlers.html ' ), <<<'EOT'
@@ -207,7 +208,7 @@ public function it_generates_paginated_pages()
207208 $ this ->assertStringContainsString ('Prev Link: /articles/page/2 ' , $ index );
208209 }
209210
210- /** @test */
211+ #[Test]
211212 public function it_generates_pagination_with_custom_page_name_and_route ()
212213 {
213214 // Here we'll override the `pagination_route`.
@@ -290,7 +291,7 @@ public function it_generates_pagination_with_custom_page_name_and_route()
290291 $ this ->assertStringContainsString ('Prev Link: /articles/p-2 ' , $ index );
291292 }
292293
293- /** @test */
294+ #[Test]
294295 public function it_generates_associated_paginated_pages_when_generating_only_urls_with_pagination ()
295296 {
296297 $ this ->files ->put (resource_path ('views/articles/index.antlers.html ' ), <<<'EOT'
@@ -364,7 +365,7 @@ public function it_generates_associated_paginated_pages_when_generating_only_url
364365 $ this ->assertStringContainsString ('Prev Link: /articles/page/2 ' , $ index );
365366 }
366367
367- /** @test */
368+ #[Test]
368369 public function it_enforces_trailing_slashes_when_config_enabled ()
369370 {
370371 Config::set ('statamic.ssg.enforce_trailing_slashes ' , true );
@@ -377,7 +378,7 @@ public function it_enforces_trailing_slashes_when_config_enabled()
377378 $ this ->assertStringContainsString ('<a href="http://cool-runnings.com/articles/three/">Three</a> ' , $ index );
378379 }
379380
380- /** @test */
381+ #[Test]
381382 public function it_enforces_trailing_slashes_on_paginated_urls_when_config_enabled ()
382383 {
383384 Config::set ('statamic.ssg.enforce_trailing_slashes ' , true );
@@ -411,7 +412,7 @@ public function it_enforces_trailing_slashes_on_paginated_urls_when_config_enabl
411412 $ this ->assertStringContainsString ('Prev Link: /articles/page/2/ ' , $ page3 );
412413 }
413414
414- /** @test */
415+ #[Test]
415416 public function it_still_generates_404_when_trailing_slashes_config_is_enabled ()
416417 {
417418 Config::set ('statamic.ssg.enforce_trailing_slashes ' , true );
0 commit comments