77use Javaabu \Helpers \AdminModel \AdminModel ;
88use Javaabu \Helpers \AdminModel \IsAdminModel ;
99use Javaabu \Helpers \Tests \TestCase ;
10+ use PHPUnit \Framework \Attributes \Test ;
1011
1112class CategoryWithDateCast extends Model implements AdminModel
1213{
@@ -121,7 +122,7 @@ class AdminModelTest extends TestCase
121122{
122123 use RefreshDatabase;
123124
124- /** @test */
125+ #[Test]
125126 public function it_can_get_list_of_date_fields (): void
126127 {
127128 $ this ->assertEquals ([
@@ -131,7 +132,7 @@ public function it_can_get_list_of_date_fields(): void
131132 ], CategoryWithDateCast::getDateFieldsList ());
132133 }
133134
134- /** @test */
135+ #[Test]
135136 public function it_can_determine_if_an_attribute_is_an_allowed_date_field (): void
136137 {
137138 $ this ->assertTrue (CategoryWithDateCast::isAllowedDateField ('published_at ' ));
@@ -140,23 +141,23 @@ public function it_can_determine_if_an_attribute_is_an_allowed_date_field(): voi
140141 $ this ->assertFalse (CategoryWithDateCast::isAllowedDateField ('name ' ));
141142 }
142143
143- /** @test */
144+ #[Test]
144145 public function it_can_determine_date_fields_from_date_casts (): void
145146 {
146147 $ category = new CategoryWithDateCast ();
147148
148149 $ this ->assertEquals (['published_at ' , 'created_at ' , 'updated_at ' ], $ category ->getDateAttributes ());
149150 }
150151
151- /** @test */
152+ #[Test]
152153 public function it_can_determine_date_fields_from_datetime_casts (): void
153154 {
154155 $ category = new CategoryWithDateTimeCast ();
155156
156157 $ this ->assertEquals (['published_at ' , 'created_at ' , 'updated_at ' ], $ category ->getDateAttributes ());
157158 }
158159
159- /** @test */
160+ #[Test]
160161 public function it_can_filter_models_by_date_range (): void
161162 {
162163 $ category = new CategoryWithDateCast ([
@@ -171,7 +172,7 @@ public function it_can_filter_models_by_date_range(): void
171172 $ this ->assertEquals ($ category ->id , $ found ->id );
172173 }
173174
174- /** @test */
175+ #[Test]
175176 public function it_can_search_models_using_a_partial_match (): void
176177 {
177178 $ category = new CategoryWithSearchable (['name ' => 'Apple ' , 'slug ' => 'some-slug ' ]);
@@ -182,7 +183,7 @@ public function it_can_search_models_using_a_partial_match(): void
182183 $ this ->assertEquals ($ category ->id , $ found ->id );
183184 }
184185
185- /** @test */
186+ #[Test]
186187 public function it_can_search_models_using_a_single_searchable (): void
187188 {
188189 $ category = new CategoryWithSearchable (['name ' => 'Apple ' , 'slug ' => 'some-slug ' ]);
@@ -194,7 +195,7 @@ public function it_can_search_models_using_a_single_searchable(): void
194195 $ this ->assertNull (CategoryWithSearchable::search ('some-slug ' )->first ());
195196 }
196197
197- /** @test */
198+ #[Test]
198199 public function it_can_search_models_using_a_string_searchable (): void
199200 {
200201 $ category = new CategoryWithStringSearchable (['name ' => 'Apple ' , 'slug ' => 'some-slug ' ]);
@@ -206,7 +207,7 @@ public function it_can_search_models_using_a_string_searchable(): void
206207 $ this ->assertNull (CategoryWithStringSearchable::search ('some-slug ' )->first ());
207208 }
208209
209- /** @test */
210+ #[Test]
210211 public function it_can_search_models_using_multiple_searchables (): void
211212 {
212213 $ category = new CategoryWithMultipleSearchable (['name ' => 'Apple ' , 'slug ' => 'some-slug ' ]);
@@ -221,7 +222,7 @@ public function it_can_search_models_using_multiple_searchables(): void
221222 $ this ->assertEquals ($ category ->id , $ found ->id );
222223 }
223224
224- /** @test */
225+ #[Test]
225226 public function it_can_search_models_without_searchable (): void
226227 {
227228 $ category = new CategoryWithoutSearchable (['name ' => 'Apple ' , 'slug ' => 'some-slug ' ]);
0 commit comments