22
33namespace  Esign \DatabaseAuditing \Tests \Commands ;
44
5+ use  PHPUnit \Framework \Attributes \Test ;
56use  Esign \DatabaseAuditing \Commands \MigrationCreator ;
67use  Esign \DatabaseAuditing \Models \Audit ;
78use  Esign \DatabaseAuditing \Tests \Support \Concerns \CleansPublishedMigrations ;
1415use  Illuminate \Database \Console \Migrations \MigrateCommand ;
1516use  Illuminate \Support \Composer ;
1617
17- class  AuditTriggerMakeCommandTest extends  TestCase
18+ final   class  AuditTriggerMakeCommandTest extends  TestCase
1819{
1920    use  MakesAuditTrigger;
2021    use  CleansPublishedMigrations;
@@ -26,8 +27,8 @@ protected function tearDown(): void
2627        parent ::tearDown ();
2728    }
2829
29-     /** @test */ 
30-     public  function  it_can_run_the_audit_trigger_command ()
30+     #[Test] 
31+     public  function  it_can_run_the_audit_trigger_command ():  void 
3132    {
3233        $ this  ->mock (MigrationCreator::class, function  ($ mock ) {
3334            $ mock ->shouldReceive ('createTrigger ' )->once ();
@@ -49,8 +50,8 @@ public function it_can_run_the_audit_trigger_command()
4950        $ auditTriggerCommand ->assertSuccessful ();
5051    }
5152
52-     /** @test */ 
53-     public  function  it_can_create_a_database_trigger_when_the_command_is_executed ()
53+     #[Test] 
54+     public  function  it_can_create_a_database_trigger_when_the_command_is_executed ():  void 
5455    {
5556        $ auditTriggerCommand  = $ this  ->makeAuditTrigger (
5657            triggerTable: 'posts ' ,
@@ -67,8 +68,8 @@ public function it_can_create_a_database_trigger_when_the_command_is_executed()
6768        $ this  ->assertTrue (Schema::hasTrigger ('audit_after_posts_update ' ));
6869    }
6970
70-     /** @test */ 
71-     public  function  it_can_create_an_audit_using_an_update_event ()
71+     #[Test] 
72+     public  function  it_can_create_an_audit_using_an_update_event ():  void 
7273    {
7374        $ post  = Post::create (['title '  => 'My Title ' , 'slug '  => 'my-title ' ]);
7475        $ auditTriggerCommand  = $ this  ->makeAuditTrigger (
@@ -93,8 +94,8 @@ public function it_can_create_an_audit_using_an_update_event()
9394        ]);
9495    }
9596
96-     /** @test */ 
97-     public  function  it_can_create_an_audit_using_an_insert_event ()
97+     #[Test] 
98+     public  function  it_can_create_an_audit_using_an_insert_event ():  void 
9899    {
99100        $ auditTriggerCommand  = $ this  ->makeAuditTrigger (
100101            triggerTable: 'posts ' ,
@@ -117,8 +118,8 @@ public function it_can_create_an_audit_using_an_insert_event()
117118        ]);
118119    }
119120
120-     /** @test */ 
121-     public  function  it_can_create_an_audit_using_a_delete_event ()
121+     #[Test] 
122+     public  function  it_can_create_an_audit_using_a_delete_event ():  void 
122123    {
123124        $ post  = Post::create (['title '  => 'My Title ' , 'slug '  => 'my-title ' ]);
124125        $ auditTriggerCommand  = $ this  ->makeAuditTrigger (
@@ -143,8 +144,8 @@ public function it_can_create_an_audit_using_a_delete_event()
143144        ]);
144145    }
145146
146-     /** @test */ 
147-     public  function  it_can_run_the_audit_trigger_command_using_a_custom_name ()
147+     #[Test] 
148+     public  function  it_can_run_the_audit_trigger_command_using_a_custom_name ():  void 
148149    {
149150        $ auditTriggerCommand  = $ this  ->makeAuditTrigger (
150151            triggerName: 'my_trigger ' ,
0 commit comments