@@ -69,8 +69,6 @@ public function testSend()
69
69
$ this ->assertStringContainsString ('Subject: Hello! ' , $ content );
70
70
$ this ->assertStringContainsString ('To: Saif Eddin <saif.gmati@symfony.com> ' , $ content );
71
71
$ this ->assertStringContainsString ('From: Fabien <fabpot@symfony.com> ' , $ content );
72
- $ this ->assertStringContainsString ('Sender: Senior Fabien Eddin <fabpot@symfony.com> ' , $ content );
73
- $ this ->assertStringContainsString ('h:sender: "Senior Fabien Eddin" <fabpot@symfony.com> ' , $ content );
74
72
$ this ->assertStringContainsString ('Hello There! ' , $ content );
75
73
76
74
return new MockResponse (json_encode (['id ' => 'foobar ' ]), [
@@ -81,17 +79,11 @@ public function testSend()
81
79
$ transport ->setPort (8984 );
82
80
83
81
$ mail = new Email ();
84
- $ toAddress = new Address ('saif.gmati@symfony.com ' , 'Saif Eddin ' );
85
- $ fromAddress = new Address ('fabpot@symfony.com ' , 'Fabien ' );
86
- $ senderAddress = new Address ('fabpot@symfony.com ' , 'Senior Fabien Eddin ' );
87
82
$ mail ->subject ('Hello! ' )
88
- ->to ($ toAddress )
89
- ->from ($ fromAddress )
90
- ->sender ($ senderAddress )
83
+ ->to (new Address ('saif.gmati@symfony.com ' , 'Saif Eddin ' ))
84
+ ->from (new Address ('fabpot@symfony.com ' , 'Fabien ' ))
91
85
->text ('Hello There! ' );
92
86
93
- $ mail ->getHeaders ()->addHeader ('h:sender ' , $ mail ->getSender ()->toString ());
94
-
95
87
$ message = $ transport ->send ($ mail );
96
88
97
89
$ this ->assertSame ('foobar ' , $ message ->getMessageId ());
0 commit comments