@@ -100,14 +100,14 @@ public function testDisableRegistration()
100100 $ loader ->load ([$ config ], $ this ->configuration );
101101 $ this ->assertNotHasDefinition ('fos_user.registration.form.factory ' );
102102
103- $ mailer = $ this ->configuration ->getDefinition ('fos_user.mailer.twig_swift ' );
103+ $ mailer = $ this ->configuration ->getDefinition ('fos_user.mailer.twig_symfony ' );
104104 $ parameters = $ this ->configuration ->getParameterBag ()->resolveValue (
105105 $ mailer ->getArgument (3 )
106106 );
107107 $ this ->assertSame (
108108 [
109- 'confirmation ' => ['no-registration@acme.com ' => 'Acme Ltd ' ],
110- 'resetting ' => ['admin@acme.org ' => 'Acme Corp ' ],
109+ 'confirmation ' => ['address ' => ' no-registration@acme.com ' , ' sender_name ' => 'Acme Ltd ' ],
110+ 'resetting ' => ['address ' => ' admin@acme.org ' , ' sender_name ' => 'Acme Corp ' ],
111111 ],
112112 $ parameters ['from_email ' ]
113113 );
@@ -122,14 +122,14 @@ public function testDisableResetting()
122122 $ loader ->load ([$ config ], $ this ->configuration );
123123 $ this ->assertNotHasDefinition ('fos_user.resetting.form.factory ' );
124124
125- $ mailer = $ this ->configuration ->getDefinition ('fos_user.mailer.twig_swift ' );
125+ $ mailer = $ this ->configuration ->getDefinition ('fos_user.mailer.twig_symfony ' );
126126 $ parameters = $ this ->configuration ->getParameterBag ()->resolveValue (
127127 $ mailer ->getArgument (3 )
128128 );
129129 $ this ->assertSame (
130130 [
131- 'confirmation ' => ['admin@acme.org ' => 'Acme Corp ' ],
132- 'resetting ' => ['no-resetting@acme.com ' => 'Acme Ltd ' ],
131+ 'confirmation ' => ['address ' => ' admin@acme.org ' , ' sender_name ' => 'Acme Corp ' ],
132+ 'resetting ' => ['address ' => ' no-resetting@acme.com ' , ' sender_name ' => 'Acme Ltd ' ],
133133 ],
134134 $ parameters ['from_email ' ]
135135 );
@@ -166,8 +166,8 @@ public function testEmailsDisabledFeature($testConfig, $registration, $resetting
166166 $ config = array_merge ($ config , $ testConfig );
167167 $ loader ->load ([$ config ], $ this ->configuration );
168168
169- $ this ->assertParameter ($ registration , 'fos_user.registration.confirmation.from_email ' );
170- $ this ->assertParameter ($ resetting , 'fos_user.resetting.email.from_email ' );
169+ $ this ->assertParameter ($ registration , 'fos_user.registration.confirmation.from_address ' );
170+ $ this ->assertParameter ($ resetting , 'fos_user.resetting.email.from_address ' );
171171 }
172172
173173 public function providerEmailsDisabledFeature ()
@@ -190,13 +190,13 @@ public function providerEmailsDisabledFeature()
190190 ],
191191 ];
192192
193- $ default = ['admin@acme.org ' => 'Acme Corp ' ];
194- $ overriden = ['ltd@acme.com ' => 'Acme Ltd ' ];
193+ $ default = ['address ' => ' admin@acme.org ' , ' sender_name ' => 'Acme Corp ' ];
194+ $ overriden = ['address ' => ' ltd@acme.com ' , ' sender_name ' => 'Acme Ltd ' ];
195195
196196 return [
197- [$ configBothFeaturesDisabled , ['no-registration@acme.com ' => 'Acme Ltd ' ], ['no-resetting@acme.com ' => 'Acme Ltd ' ]],
198- [$ configResettingDisabled , $ default , ['no-resetting@acme.com ' => 'Acme Ltd ' ]],
199- [$ configRegistrationDisabled , ['no-registration@acme.com ' => 'Acme Ltd ' ], $ default ],
197+ [$ configBothFeaturesDisabled , ['address ' => ' no-registration@acme.com ', ' sender_name ' => 'Acme Ltd ' ], ['address ' => ' no-resetting@acme.com ' , ' sender_name ' => 'Acme Ltd ' ]],
198+ [$ configResettingDisabled , $ default , ['address ' => ' no-resetting@acme.com ' , ' sender_name ' => 'Acme Ltd ' ]],
199+ [$ configRegistrationDisabled , ['address ' => ' no-registration@acme.com ' , ' sender_name ' => 'Acme Ltd ' ], $ default ],
200200 [$ configOverridenRegistrationEmail , $ overriden , $ default ],
201201 [$ configOverridenResettingEmail , $ default , $ overriden ],
202202 ];
@@ -289,10 +289,10 @@ public function testUserLoadConfirmationEmailWithDefaults()
289289 $ this ->createEmptyConfiguration ();
290290
291291 $ this ->assertParameter (false , 'fos_user.registration.confirmation.enabled ' );
292- $ this ->assertParameter (['admin@acme.org ' => 'Acme Corp ' ], 'fos_user.registration.confirmation.from_email ' );
292+ $ this ->assertParameter (['address ' => ' admin@acme.org ', ' sender_name ' => 'Acme Corp ' ], 'fos_user.registration.confirmation.from_address ' );
293293 $ this ->assertParameter ('@FOSUser/Registration/email.txt.twig ' , 'fos_user.registration.confirmation.template ' );
294294 $ this ->assertParameter ('@FOSUser/Resetting/email.txt.twig ' , 'fos_user.resetting.email.template ' );
295- $ this ->assertParameter (['admin@acme.org ' => 'Acme Corp ' ], 'fos_user.resetting.email.from_email ' );
295+ $ this ->assertParameter (['address ' => ' admin@acme.org ', ' sender_name ' => 'Acme Corp ' ], 'fos_user.resetting.email.from_address ' );
296296 $ this ->assertParameter (86400 , 'fos_user.resetting.token_ttl ' );
297297 }
298298
@@ -301,10 +301,10 @@ public function testUserLoadConfirmationEmail()
301301 $ this ->createFullConfiguration ();
302302
303303 $ this ->assertParameter (true , 'fos_user.registration.confirmation.enabled ' );
304- $ this ->assertParameter (['register@acme.org ' => 'Acme Corp ' ], 'fos_user.registration.confirmation.from_email ' );
304+ $ this ->assertParameter (['address ' => ' register@acme.org ', ' sender_name ' => 'Acme Corp ' ], 'fos_user.registration.confirmation.from_address ' );
305305 $ this ->assertParameter ('AcmeMyBundle:Registration:mail.txt.twig ' , 'fos_user.registration.confirmation.template ' );
306306 $ this ->assertParameter ('AcmeMyBundle:Resetting:mail.txt.twig ' , 'fos_user.resetting.email.template ' );
307- $ this ->assertParameter (['reset@acme.org ' => 'Acme Corp ' ], 'fos_user.resetting.email.from_email ' );
307+ $ this ->assertParameter (['address ' => ' reset@acme.org ', ' sender_name ' => 'Acme Corp ' ], 'fos_user.resetting.email.from_address ' );
308308 $ this ->assertParameter (7200 , 'fos_user.resetting.retry_ttl ' );
309309 }
310310
0 commit comments