1010class ResendTest extends Base
1111{
1212 private Resend $ sender ;
13+
1314 private string $ testEmail ;
1415
1516 protected function setUp (): void
1617 {
1718 parent ::setUp ();
19+ $ this ->requireEnv (['RESEND_API_KEY ' , 'RESEND_TEST_EMAIL ' ]);
20+
1821 $ key = \getenv ('RESEND_API_KEY ' );
1922 $ this ->sender = new Resend ($ key );
2023 $ this ->testEmail = \getenv ('RESEND_TEST_EMAIL ' );
2124
2225 sleep (2 );
2326 }
2427
25- public function testSendEmail (): void
28+ public function test_send_email (): void
2629 {
2730 $ to = $ this ->testEmail ;
2831 $ subject = 'Test Subject ' ;
@@ -46,7 +49,7 @@ public function testSendEmail(): void
4649 $ this ->assertResponse ($ response );
4750 }
4851
49- public function testSendEmailWithHtml (): void
52+ public function test_send_email_with_html (): void
5053 {
5154 $ to = $ this ->testEmail ;
5255 $ subject = 'Test HTML Subject ' ;
@@ -67,7 +70,7 @@ public function testSendEmailWithHtml(): void
6770 $ this ->assertResponse ($ response );
6871 }
6972
70- public function testSendEmailWithReplyTo (): void
73+ public function test_send_email_with_reply_to (): void
7174 {
7275 $ to = $ this ->testEmail ;
7376 $ subject = 'Test Reply-To Subject ' ;
@@ -90,7 +93,7 @@ public function testSendEmailWithReplyTo(): void
9093 $ this ->assertResponse ($ response );
9194 }
9295
93- public function testSendMultipleEmails (): void
96+ public function test_send_multiple_emails (): void
9497 {
9598 $ to1 = $ this ->testEmail ;
9699 $ to2 = $ this ->testEmail ;
@@ -115,7 +118,7 @@ public function testSendMultipleEmails(): void
115118 $ this ->assertEquals ('success ' , $ response ['results ' ][1 ]['status ' ], \var_export ($ response , true ));
116119 }
117120
118- public function testSendEmailWithFileAttachment (): void
121+ public function test_send_email_with_file_attachment (): void
119122 {
120123 $ message = new Email (
121124 to: [$ this ->testEmail ],
@@ -135,7 +138,7 @@ public function testSendEmailWithFileAttachment(): void
135138 $ this ->assertResponse ($ response );
136139 }
137140
138- public function testSendEmailWithStringAttachment (): void
141+ public function test_send_email_with_string_attachment (): void
139142 {
140143 $ message = new Email (
141144 to: [$ this ->testEmail ],
@@ -156,7 +159,7 @@ public function testSendEmailWithStringAttachment(): void
156159 $ this ->assertResponse ($ response );
157160 }
158161
159- public function testSendEmailWithAttachmentExceedingMaxSize (): void
162+ public function test_send_email_with_attachment_exceeding_max_size (): void
160163 {
161164 $ this ->expectException (\Exception::class);
162165 $ this ->expectExceptionMessage ('Total attachment size exceeds ' );
0 commit comments