@@ -100,14 +100,14 @@ public function testDisableRegistration()
100
100
$ loader ->load ([$ config ], $ this ->configuration );
101
101
$ this ->assertNotHasDefinition ('fos_user.registration.form.factory ' );
102
102
103
- $ mailer = $ this ->configuration ->getDefinition ('fos_user.mailer.twig_swift ' );
103
+ $ mailer = $ this ->configuration ->getDefinition ('fos_user.mailer.twig_symfony ' );
104
104
$ parameters = $ this ->configuration ->getParameterBag ()->resolveValue (
105
105
$ mailer ->getArgument (3 )
106
106
);
107
107
$ this ->assertSame (
108
108
[
109
- 'confirmation ' => [
'[email protected] ' =>
'Acme Ltd ' ],
110
- 'resetting ' => [
'[email protected] ' =>
'Acme Corp ' ],
109
+ 'confirmation ' => [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Ltd ' ],
110
+ 'resetting ' => [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Corp ' ],
111
111
],
112
112
$ parameters ['from_email ' ]
113
113
);
@@ -122,14 +122,14 @@ public function testDisableResetting()
122
122
$ loader ->load ([$ config ], $ this ->configuration );
123
123
$ this ->assertNotHasDefinition ('fos_user.resetting.form.factory ' );
124
124
125
- $ mailer = $ this ->configuration ->getDefinition ('fos_user.mailer.twig_swift ' );
125
+ $ mailer = $ this ->configuration ->getDefinition ('fos_user.mailer.twig_symfony ' );
126
126
$ parameters = $ this ->configuration ->getParameterBag ()->resolveValue (
127
127
$ mailer ->getArgument (3 )
128
128
);
129
129
$ this ->assertSame (
130
130
[
131
- 'confirmation ' => [
'[email protected] ' =>
'Acme Corp ' ],
132
- 'resetting ' => [
'[email protected] ' =>
'Acme Ltd ' ],
131
+ 'confirmation ' => [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Corp ' ],
132
+ 'resetting ' => [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Ltd ' ],
133
133
],
134
134
$ parameters ['from_email ' ]
135
135
);
@@ -166,8 +166,8 @@ public function testEmailsDisabledFeature($testConfig, $registration, $resetting
166
166
$ config = array_merge ($ config , $ testConfig );
167
167
$ loader ->load ([$ config ], $ this ->configuration );
168
168
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 ' );
171
171
}
172
172
173
173
public function providerEmailsDisabledFeature ()
@@ -190,13 +190,13 @@ public function providerEmailsDisabledFeature()
190
190
],
191
191
];
192
192
193
- $ default = [
'[email protected] ' =>
'Acme Corp ' ];
194
- $ overriden = [
'[email protected] ' =>
'Acme Ltd ' ];
193
+ $ default = [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Corp ' ];
194
+ $ overriden = [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Ltd ' ];
195
195
196
196
return [
197
- [
$ configBothFeaturesDisabled, [
'[email protected] ' =>
'Acme Ltd ' ], [
'[email protected] ' =>
'Acme Ltd ' ]],
198
- [
$ configResettingDisabled,
$ default, [
'[email protected] ' =>
'Acme Ltd ' ]],
199
- [
$ configRegistrationDisabled, [
'[email protected] ' =>
'Acme Ltd ' ],
$ default],
197
+ [
$ configBothFeaturesDisabled, [
'address ' => ' [email protected] ', ' sender_name ' =>
'Acme Ltd ' ], [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Ltd ' ]],
198
+ [
$ configResettingDisabled,
$ default, [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Ltd ' ]],
199
+ [
$ configRegistrationDisabled, [
'address ' => ' [email protected] ' , ' sender_name ' =>
'Acme Ltd ' ],
$ default],
200
200
[$ configOverridenRegistrationEmail , $ overriden , $ default ],
201
201
[$ configOverridenResettingEmail , $ default , $ overriden ],
202
202
];
@@ -289,10 +289,10 @@ public function testUserLoadConfirmationEmailWithDefaults()
289
289
$ this ->createEmptyConfiguration ();
290
290
291
291
$ this ->assertParameter (false , 'fos_user.registration.confirmation.enabled ' );
292
- $ this ->
assertParameter ([
'[email protected] ' =>
'Acme Corp ' ],
'fos_user.registration.confirmation.from_email ' );
292
+ $ this ->
assertParameter ([
'address ' => ' [email protected] ', ' sender_name ' =>
'Acme Corp ' ],
'fos_user.registration.confirmation.from_address ' );
293
293
$ this ->assertParameter ('@FOSUser/Registration/email.txt.twig ' , 'fos_user.registration.confirmation.template ' );
294
294
$ this ->assertParameter ('@FOSUser/Resetting/email.txt.twig ' , 'fos_user.resetting.email.template ' );
295
- $ this ->
assertParameter ([
'[email protected] ' =>
'Acme Corp ' ],
'fos_user.resetting.email.from_email ' );
295
+ $ this ->
assertParameter ([
'address ' => ' [email protected] ', ' sender_name ' =>
'Acme Corp ' ],
'fos_user.resetting.email.from_address ' );
296
296
$ this ->assertParameter (86400 , 'fos_user.resetting.token_ttl ' );
297
297
}
298
298
@@ -301,10 +301,10 @@ public function testUserLoadConfirmationEmail()
301
301
$ this ->createFullConfiguration ();
302
302
303
303
$ this ->assertParameter (true , 'fos_user.registration.confirmation.enabled ' );
304
- $ this ->
assertParameter ([
'[email protected] ' =>
'Acme Corp ' ],
'fos_user.registration.confirmation.from_email ' );
304
+ $ this ->
assertParameter ([
'address ' => ' [email protected] ', ' sender_name ' =>
'Acme Corp ' ],
'fos_user.registration.confirmation.from_address ' );
305
305
$ this ->assertParameter ('AcmeMyBundle:Registration:mail.txt.twig ' , 'fos_user.registration.confirmation.template ' );
306
306
$ this ->assertParameter ('AcmeMyBundle:Resetting:mail.txt.twig ' , 'fos_user.resetting.email.template ' );
307
- $ this ->
assertParameter ([
'[email protected] ' =>
'Acme Corp ' ],
'fos_user.resetting.email.from_email ' );
307
+ $ this ->
assertParameter ([
'address ' => ' [email protected] ', ' sender_name ' =>
'Acme Corp ' ],
'fos_user.resetting.email.from_address ' );
308
308
$ this ->assertParameter (7200 , 'fos_user.resetting.retry_ttl ' );
309
309
}
310
310
0 commit comments