Skip to content

Commit 200a2b8

Browse files
committed
use test email by resend
1 parent 0a50d87 commit 200a2b8

4 files changed

Lines changed: 18 additions & 14 deletions

File tree

.env.dev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ MAILGUN_API_KEY=
22
MAILGUN_DOMAIN=
33
SENDGRID_API_KEY=
44
RESEND_API_KEY=
5+
RESEND_TEST_EMAIL=
56
FCM_SERVICE_ACCOUNT_JSON=
67
FCM_TO=
78
TWILIO_ACCOUNT_SID=

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
FAST2SMS_TO: ${{ secrets.FAST2SMS_TO }}
5252
INFORU_API_TOKEN: ${{ secrets.INFORU_API_TOKEN }}
5353
INFORU_SENDER_ID: ${{ secrets.INFORU_SENDER_ID }}
54+
55+
RESEND_TEST_EMAIL: ${{ vars.RESEND_TEST_EMAIL }}
5456
run: |
5557
docker compose up -d --build
5658
sleep 5

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ services:
1111
- MAILGUN_DOMAIN
1212
- SENDGRID_API_KEY
1313
- RESEND_API_KEY
14+
- RESEND_TEST_EMAIL
1415
- FCM_SERVICE_ACCOUNT_JSON
1516
- FCM_TO
1617
- TWILIO_ACCOUNT_SID

tests/Messaging/Adapter/Email/ResendTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public function testSendEmail(): void
1414
$key = \getenv('RESEND_API_KEY');
1515
$sender = new Resend($key);
1616

17-
$to = \getenv('TEST_EMAIL');
17+
$to = \getenv('RESEND_TEST_EMAIL');
1818
$subject = 'Test Subject';
1919
$content = 'Test Content';
20-
$fromEmail = \getenv('TEST_FROM_EMAIL');
21-
$cc = [['email' => \getenv('TEST_CC_EMAIL')]];
22-
$bcc = [['name' => \getenv('TEST_BCC_NAME'), 'email' => \getenv('TEST_BCC_EMAIL')]];
20+
$fromEmail = \getenv('RESEND_TEST_EMAIL');
21+
$cc = [['email' => \getenv('RESEND_TEST_EMAIL')]];
22+
$bcc = [['name' => 'Test BCC', 'email' => \getenv('RESEND_TEST_EMAIL')]];
2323

2424
$message = new Email(
2525
to: [$to],
@@ -41,10 +41,10 @@ public function testSendEmailWithHtml(): void
4141
$key = \getenv('RESEND_API_KEY');
4242
$sender = new Resend($key);
4343

44-
$to = \getenv('TEST_EMAIL');
44+
$to = \getenv('RESEND_TEST_EMAIL');
4545
$subject = 'Test HTML Subject';
4646
$content = '<h1>Test HTML Content</h1><p>This is a test email with HTML content.</p>';
47-
$fromEmail = \getenv('TEST_FROM_EMAIL');
47+
$fromEmail = \getenv('RESEND_TEST_EMAIL');
4848

4949
$message = new Email(
5050
to: [$to],
@@ -65,11 +65,11 @@ public function testSendEmailWithReplyTo(): void
6565
$key = \getenv('RESEND_API_KEY');
6666
$sender = new Resend($key);
6767

68-
$to = \getenv('TEST_EMAIL');
68+
$to = \getenv('RESEND_TEST_EMAIL');
6969
$subject = 'Test Reply-To Subject';
7070
$content = 'Test Content with Reply-To';
71-
$fromEmail = \getenv('TEST_FROM_EMAIL');
72-
$replyToEmail = \getenv('TEST_CC_EMAIL');
71+
$fromEmail = \getenv('RESEND_TEST_EMAIL');
72+
$replyToEmail = \getenv('RESEND_TEST_EMAIL');
7373

7474
$message = new Email(
7575
to: [$to],
@@ -91,11 +91,11 @@ public function testSendMultipleEmails(): void
9191
$key = \getenv('RESEND_API_KEY');
9292
$sender = new Resend($key);
9393

94-
$to1 = \getenv('TEST_EMAIL');
95-
$to2 = \getenv('TEST_CC_EMAIL');
94+
$to1 = \getenv('RESEND_TEST_EMAIL');
95+
$to2 = \getenv('RESEND_TEST_EMAIL');
9696
$subject = 'Test Batch Subject';
9797
$content = 'Test Batch Content';
98-
$fromEmail = \getenv('TEST_FROM_EMAIL');
98+
$fromEmail = \getenv('RESEND_TEST_EMAIL');
9999

100100
$message = new Email(
101101
to: [$to1, $to2],
@@ -122,10 +122,10 @@ public function testSendEmailWithAttachmentsThrowsException(): void
122122
$key = \getenv('RESEND_API_KEY');
123123
$sender = new Resend($key);
124124

125-
$to = \getenv('TEST_EMAIL');
125+
$to = \getenv('RESEND_TEST_EMAIL');
126126
$subject = 'Test Subject';
127127
$content = 'Test Content';
128-
$fromEmail = \getenv('TEST_FROM_EMAIL');
128+
$fromEmail = \getenv('RESEND_TEST_EMAIL');
129129

130130
$message = new Email(
131131
to: [$to],

0 commit comments

Comments
 (0)