Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Emails/Receiving.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @property null|array $bcc The email addresses of all blind carbon copy recipients.
* @property null|array $cc The email addresses of all carbon copy recipients.
* @property null|array $reply_to The reply to email address.
* @property array $received_for The addresses the email was received for (forwarding recipients).
* @property string $message_id The unique identifier for the message.
* @property null|array $headers The headers for the received email.
* @property array $attachments The attachments for the email.
Expand Down
1 change: 1 addition & 0 deletions tests/Fixtures/Emails/Receiving.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function inboundEmail(): array
'bcc' => [],
'cc' => [],
'reply_to' => [],
'received_for' => ['forwarded@example.com'],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: inboundEmails() fixture is missing the 'received_for' field that was just added to inboundEmail(). These fixtures represent the same email resource; omitting it creates an inconsistency that can mask bugs in list-response handling.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At tests/Fixtures/Emails/Receiving.php, line 17:

<comment>inboundEmails() fixture is missing the 'received_for' field that was just added to inboundEmail(). These fixtures represent the same email resource; omitting it creates an inconsistency that can mask bugs in list-response handling.</comment>

<file context>
@@ -14,6 +14,7 @@ function inboundEmail(): array
         'bcc' => [],
         'cc' => [],
         'reply_to' => [],
+        'received_for' => ['forwarded@example.com'],
         'message_id' => '<example+123>',
         'attachments' => [
</file context>

'message_id' => '<example+123>',
'attachments' => [
[
Expand Down
3 changes: 2 additions & 1 deletion tests/Service/Emails/Receiving.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
$result = $client->emails->receiving->get('4ef9a417-02e9-4d39-ad75-9611e0fcc33c');

expect($result)->toBeInstanceOf(Receiving::class)
->id->toBe('4ef9a417-02e9-4d39-ad75-9611e0fcc33c');
->id->toBe('4ef9a417-02e9-4d39-ad75-9611e0fcc33c')
->received_for->toBe(['forwarded@example.com']);
});

it('can get a list of inbound email resources', function () {
Expand Down