77use App \Models \Tag ;
88use App \Models \User ;
99use Illuminate \Foundation \Testing \RefreshDatabase ;
10+ use PHPUnit \Framework \Attributes \Test ;
1011use Tests \TestCase ;
1112
1213class PostDateTest extends TestCase
@@ -17,7 +18,7 @@ class PostDateTest extends TestCase
1718 private Category $ category ;
1819 private Tag $ tag ;
1920
20- /** @test */
21+ #[Test]
2122 public function post_can_save_date_in_y_m_d_format ()
2223 {
2324 $ postData = [
@@ -46,7 +47,7 @@ public function post_can_save_date_in_y_m_d_format()
4647 $ this ->assertEquals ('2025-01-15 ' , $ post ->date );
4748 }
4849
49- /** @test */
50+ #[Test]
5051 public function post_can_update_date_in_y_m_d_format ()
5152 {
5253 $ post = Post::factory ()->create ([
@@ -83,7 +84,7 @@ public function post_can_update_date_in_y_m_d_format()
8384 $ this ->assertEquals ('2025-02-20 ' , $ post ->date );
8485 }
8586
86- /** @test */
87+ #[Test]
8788 public function post_date_mutator_handles_empty_date ()
8889 {
8990 $ post = new Post ();
@@ -92,7 +93,7 @@ public function post_date_mutator_handles_empty_date()
9293 $ this ->assertNull ($ post ->getAttributes ()['date ' ]);
9394 }
9495
95- /** @test */
96+ #[Test]
9697 public function post_date_mutator_handles_null_date ()
9798 {
9899 $ post = new Post ();
@@ -101,7 +102,7 @@ public function post_date_mutator_handles_null_date()
101102 $ this ->assertNull ($ post ->getAttributes ()['date ' ]);
102103 }
103104
104- /** @test */
105+ #[Test]
105106 public function post_date_mutator_converts_valid_date ()
106107 {
107108 $ post = new Post ();
@@ -110,7 +111,7 @@ public function post_date_mutator_converts_valid_date()
110111 $ this ->assertEquals ('2025-01-15 ' , $ post ->getAttributes ()['date ' ]);
111112 }
112113
113- /** @test */
114+ #[Test]
114115 public function post_date_accessor_returns_saved_date ()
115116 {
116117 $ post = Post::factory ()->create ([
@@ -122,7 +123,7 @@ public function post_date_accessor_returns_saved_date()
122123 $ this ->assertEquals ('2025-01-15 ' , $ post ->date );
123124 }
124125
125- /** @test */
126+ #[Test]
126127 public function post_date_accessor_returns_null_for_empty_date ()
127128 {
128129 $ post = Post::factory ()->create ([
@@ -134,7 +135,7 @@ public function post_date_accessor_returns_null_for_empty_date()
134135 $ this ->assertNull ($ post ->date );
135136 }
136137
137- /** @test */
138+ #[Test]
138139 public function debug_post_creation_with_specific_date ()
139140 {
140141 $ testDate = '2025-07-06 ' ;
0 commit comments