66use BeyondCode \Mailbox \InboundEmail ;
77use Illuminate \Mail \Mailable ;
88use Illuminate \Support \Facades \Mail ;
9+ use PHPUnit \Framework \Attributes \Test ;
910
1011class InboundEmailTest extends TestCase
1112{
@@ -17,7 +18,7 @@ protected function getEnvironmentSetUp($app)
1718 $ app ['config ' ]['mailbox.driver ' ] = 'log ' ;
1819 }
1920
20- /** @test */
21+ #[Test]
2122 public function it_stores_inbound_emails ()
2223 {
2324 Mailbox::to ('someone@beyondco.de ' , function ($ email ) {
@@ -29,7 +30,7 @@ public function it_stores_inbound_emails()
2930 $ this ->assertSame (1 , InboundEmail::query ()->count ());
3031 }
3132
32- /** @test */
33+ #[Test]
3334 public function it_stores_all_inbound_emails ()
3435 {
3536 $ this ->app ['config ' ]['mailbox.only_store_matching_emails ' ] = false ;
@@ -43,7 +44,7 @@ public function it_stores_all_inbound_emails()
4344 $ this ->assertSame (2 , InboundEmail::query ()->count ());
4445 }
4546
46- /** @test */
47+ #[Test]
4748 public function it_can_use_fallbacks ()
4849 {
4950 Mailbox::fallback (function (InboundEmail $ email ) {
@@ -57,7 +58,7 @@ public function it_can_use_fallbacks()
5758 Mail::assertSent (ReplyMail::class);
5859 }
5960
60- /** @test */
61+ #[Test]
6162 public function it_can_use_catchall ()
6263 {
6364 Mailbox::to ('someone@beyondco.de ' , function ($ email ) {
@@ -74,7 +75,7 @@ public function it_can_use_catchall()
7475 Mail::assertSent (ReplyMail::class);
7576 }
7677
77- /** @test */
78+ #[Test]
7879 public function it_stores_inbound_emails_with_catchall ()
7980 {
8081 Mailbox::catchAll (function ($ email ) {
@@ -86,7 +87,7 @@ public function it_stores_inbound_emails_with_catchall()
8687 $ this ->assertSame (2 , InboundEmail::query ()->count ());
8788 }
8889
89- /** @test */
90+ #[Test]
9091 public function it_stores_inbound_emails_with_fallback ()
9192 {
9293 Mailbox::fallback (function ($ email ) {
@@ -98,7 +99,7 @@ public function it_stores_inbound_emails_with_fallback()
9899 $ this ->assertSame (2 , InboundEmail::query ()->count ());
99100 }
100101
101- /** @test */
102+ #[Test]
102103 public function it_stores_inbound_emails_with_fallback_and_catchall_only_once ()
103104 {
104105 Mailbox::fallback (function ($ email ) {
@@ -113,7 +114,7 @@ public function it_stores_inbound_emails_with_fallback_and_catchall_only_once()
113114 $ this ->assertSame (2 , InboundEmail::query ()->count ());
114115 }
115116
116- /** @test */
117+ #[Test]
117118 public function it_does_not_store_inbound_emails_if_configured ()
118119 {
119120 $ this ->app ['config ' ]['mailbox.store_incoming_emails_for_days ' ] = 0 ;
@@ -127,7 +128,7 @@ public function it_does_not_store_inbound_emails_if_configured()
127128 $ this ->assertSame (0 , InboundEmail::query ()->count ());
128129 }
129130
130- /** @test */
131+ #[Test]
131132 public function it_can_reply_to_mails ()
132133 {
133134 Mailbox::from ('example@beyondco.de ' , function (InboundEmail $ email ) {
@@ -141,7 +142,7 @@ public function it_can_reply_to_mails()
141142 Mail::assertSent (ReplyMail::class);
142143 }
143144
144- /** @test */
145+ #[Test]
145146 public function it_uses_the_configured_model ()
146147 {
147148 $ this ->app ['config ' ]['mailbox.model ' ] = ExtendedInboundEmail::class;
0 commit comments