Skip to content

Commit 3eb20c7

Browse files
committed
shifted test case again
1 parent 4d4e2c0 commit 3eb20c7

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

Tests/Functional/EventSubscriber/CallbackSubscriberTest.php

+32
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,36 @@ private function getCommentAndReason(string $type): array
198198
],
199199
};
200200
}
201+
202+
/**
203+
* For the message with 'type': 'out of band' and 'bounce class': 60 should never be called transportCallback.
204+
*/
205+
public function testProcessCallbackRequestWhenSoftBounce(): void
206+
{
207+
$payload = <<<JSON
208+
[
209+
{
210+
"msys": {
211+
"message_event": {
212+
"reason":"550 [internal] [oob] The message is an auto-reply/vacation mail.",
213+
"msg_from":"msprvs1=18290qww0ygol=bounces-44585-172@bounces.mauticsparkt3.com",
214+
"event_id":"13251575597141532",
215+
"raw_reason":"550 [internal] [oob] The message is an auto-reply/vacation mail.",
216+
"error_code":"550",
217+
"subaccount_id":172,
218+
"delv_method":"esmtp",
219+
"customer_id":44585,
220+
"type":"out_of_band",
221+
"bounce_class":"60",
222+
"timestamp":"2020-01-22T21:59:32.000Z"
223+
}
224+
}
225+
}
226+
]
227+
JSON;
228+
$request = new Request([], json_decode($payload, true));
229+
$this->sparkpostT->processCallbackRequest($request);
230+
$this->transportCallbackMock->expects($this->never())
231+
->method($this->anything());
232+
}
201233
}

Tests/Unit/Mailer/Transport/SparkpostTransportMessageTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
class SparkpostTransportMessageTest extends TestCase
1818
{
19+
/**
20+
* @var TransportCallback|MockObject
21+
*/
1922
private $transportCallbackMock;
2023
private SparkpostTransport $sparkpost;
2124

@@ -194,7 +197,7 @@ private function invokeInaccessibleMethod(object $object, string $methodName, ar
194197
/**
195198
* For the message with 'type': 'out of band' and 'bounce class': 60 should never be called transportCallback.
196199
*/
197-
public function testProcessCallbackRequestWhenSoftBounce()
200+
public function testProcessCallbackRequestWhenSoftBounce(): void
198201
{
199202
$payload = <<<JSON
200203
[

0 commit comments

Comments
 (0)