@@ -37,19 +37,19 @@ public static function getTransportData(): array
37
37
{
38
38
return [
39
39
[
40
- ( new MailtrapApiSandboxTransport ('KEY ' ))-> setInboxId ( 123456 ),
40
+ new MailtrapApiSandboxTransport ('KEY ' , null , null , null , 123456 ),
41
41
'mailtrap+sandbox://sandbox.api.mailtrap.io/?inboxId=123456 ' ,
42
42
],
43
43
[
44
- (new MailtrapApiSandboxTransport ('KEY ' ))-> setInboxId ( 123456 )->setHost ('example.com ' ),
44
+ (new MailtrapApiSandboxTransport ('KEY ' , null , null , null , 123456 ) )->setHost ('example.com ' ),
45
45
'mailtrap+sandbox://example.com/?inboxId=123456 ' ,
46
46
],
47
47
[
48
- (new MailtrapApiSandboxTransport ('KEY ' ))-> setInboxId ( 123456 )->setHost ('example.com ' )->setPort (99 ),
48
+ (new MailtrapApiSandboxTransport ('KEY ' , null , null , null , 123456 ) )->setHost ('example.com ' )->setPort (99 ),
49
49
'mailtrap+sandbox://example.com:99/?inboxId=123456 ' ,
50
50
],
51
51
[
52
- ( new MailtrapApiSandboxTransport ('KEY ' ))-> setInboxId ( 123456 ),
52
+ new MailtrapApiSandboxTransport ('KEY ' , null , null , null , 123456 ),
53
53
'mailtrap+sandbox://sandbox.api.mailtrap.io/?inboxId=123456 ' ,
54
54
],
55
55
];
@@ -72,7 +72,7 @@ public function testSend()
72
72
]);
73
73
});
74
74
75
- $ transport = ( new MailtrapApiSandboxTransport ('KEY ' , $ client))-> setInboxId ( 123456 );
75
+ $ transport = new MailtrapApiSandboxTransport ('KEY ' , $ client, null , null , 123456 );
76
76
77
77
$ mail = new Email ();
78
78
$ mail ->subject ('Hello! ' )
@@ -88,7 +88,7 @@ public function testSendThrowsForErrorResponse()
88
88
$ client = new MockHttpClient (static fn (string $ method , string $ url , array $ options ): ResponseInterface => new JsonMockResponse (['errors ' => ['i \'m a teapot ' ]], [
89
89
'http_code ' => 418 ,
90
90
]));
91
- $ transport = ( new MailtrapApiSandboxTransport ('KEY ' , $ client))-> setInboxId ( 123456 );
91
+ $ transport = new MailtrapApiSandboxTransport ('KEY ' , $ client, null , null , 123456 );
92
92
$ transport ->setPort (8984 );
93
93
94
94
$ mail = new Email ();
@@ -110,7 +110,7 @@ public function testTagAndMetadataHeaders()
110
110
$ email ->getHeaders ()->add (new MetadataHeader ('Client-ID ' , '12345 ' ));
111
111
$ envelope = new Envelope (new Address ('alice@system.com ' ), [new Address ('bob@system.com ' )]);
112
112
113
- $ transport = ( new MailtrapApiSandboxTransport ('ACCESS_KEY ' ))-> setInboxId ( 123456 );
113
+ $ transport = new MailtrapApiSandboxTransport ('ACCESS_KEY ' , null , null , null , 123456 );
114
114
$ method = new \ReflectionMethod (MailtrapApiSandboxTransport::class, 'getPayload ' );
115
115
$ payload = $ method ->invoke ($ transport , $ email , $ envelope );
116
116
@@ -129,7 +129,7 @@ public function testMultipleTagsAreNotAllowed()
129
129
$ email ->getHeaders ()->add (new TagHeader ('tag2 ' ));
130
130
$ envelope = new Envelope (new Address ('alice@system.com ' ), [new Address ('bob@system.com ' )]);
131
131
132
- $ transport = ( new MailtrapApiSandboxTransport ('ACCESS_KEY ' ))-> setInboxId ( 123456 );
132
+ $ transport = new MailtrapApiSandboxTransport ('ACCESS_KEY ' , null , null , null , 123456 );
133
133
$ method = new \ReflectionMethod (MailtrapApiSandboxTransport::class, 'getPayload ' );
134
134
135
135
$ this ->expectException (TransportException::class);
0 commit comments