88use Illuminate \Database \Eloquent \Model ;
99use Stancl \VirtualColumn \VirtualColumn ;
1010use Illuminate \Contracts \Database \Eloquent \CastsAttributes ;
11+ use PHPUnit \Framework \Attributes \Test ;
1112
1213class VirtualColumnTest extends TestCase
1314{
@@ -18,7 +19,7 @@ public function setUp(): void
1819 $ this ->loadMigrationsFrom (__DIR__ . '/etc/migrations ' );
1920 }
2021
21- /** @test */
22+ #[Test]
2223 public function keys_which_dont_have_their_own_column_go_into_data_json_column ()
2324 {
2425 $ model = MyModel::create ([
@@ -59,7 +60,7 @@ public function keys_which_dont_have_their_own_column_go_into_data_json_column()
5960 $ this ->assertSame (null , $ model ->data );
6061 }
6162
62- /** @test */
63+ #[Test]
6364 public function model_is_always_decoded_when_accessed_by_user_event ()
6465 {
6566 MyModel::retrieved (function (MyModel $ model ) {
@@ -90,7 +91,7 @@ public function model_is_always_decoded_when_accessed_by_user_event()
9091 MyModel::first ();
9192 }
9293
93- /** @test */
94+ #[Test]
9495 public function column_names_are_generated_correctly ()
9596 {
9697 // FooModel's virtual data column name is 'virtual'
@@ -107,7 +108,7 @@ public function column_names_are_generated_correctly()
107108 $ this ->assertSame ($ virtualColumnName , $ model ->getColumnForQuery ('foo ' ));
108109 }
109110
110- /** @test */
111+ #[Test]
111112 public function models_extending_a_parent_model_using_virtualcolumn_get_encoded_correctly ()
112113 {
113114 // Create a model that extends a parent model using VirtualColumn
@@ -130,7 +131,7 @@ public function models_extending_a_parent_model_using_virtualcolumn_get_encoded_
130131
131132 // maybe add an explicit test that the saving() and updating() listeners don't run twice?
132133
133- /** @test */
134+ #[Test]
134135 public function encrypted_casts_work_with_virtual_column () {
135136 // Custom encrypted castables have to be specified in the $customEncryptedCastables static property
136137 MyModel::$ customEncryptedCastables = [EncryptedCast::class];
0 commit comments