@@ -696,42 +696,42 @@ public function testCreateAccountWithoutPassword()
696
696
->disableOriginalConstructor ()
697
697
->getMock ();
698
698
$ testCase = $ this ;
699
- $ customer ->expects ( $ this ->any () )
700
- ->method ( 'getId ' )
701
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ customerId ) {
702
- if ($ testCase ->getIdCounter > 0 ) {
699
+ $ customer ->expects ($ this ->any ())
700
+ ->method ('getId ' )
701
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ customerId ) {
702
+ if ($ testCase ->getIdCounter > 0 ) {
703
703
return $ customerId ;
704
704
} else {
705
705
$ testCase ->getIdCounter += 1 ;
706
706
return null ;
707
707
}
708
- } ) );
708
+ }) );
709
709
$ customer ->expects ($ this ->atLeastOnce ())
710
710
->method ('getEmail ' )
711
711
->willReturn ($ customerEmail );
712
- $ customer ->expects ( $ this ->any () )
713
- ->method ( 'getWebsiteId ' )
714
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ websiteId ) {
715
- if ($ testCase ->getWebsiteIdCounter > 1 ) {
712
+ $ customer ->expects ($ this ->any ())
713
+ ->method ('getWebsiteId ' )
714
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ websiteId ) {
715
+ if ($ testCase ->getWebsiteIdCounter > 1 ) {
716
716
return $ websiteId ;
717
717
} else {
718
718
$ testCase ->getWebsiteIdCounter += 1 ;
719
719
return null ;
720
720
}
721
- } ) );
721
+ }) );
722
722
$ customer ->expects ($ this ->once ())
723
723
->method ('setWebsiteId ' )
724
724
->with ($ websiteId );
725
- $ customer ->expects ( $ this ->any () )
726
- ->method ( 'getStoreId ' )
727
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ defaultStoreId ) {
728
- if ($ testCase ->getStoreIdCounter > 0 ) {
725
+ $ customer ->expects ($ this ->any ())
726
+ ->method ('getStoreId ' )
727
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ defaultStoreId ) {
728
+ if ($ testCase ->getStoreIdCounter > 0 ) {
729
729
return $ defaultStoreId ;
730
730
} else {
731
731
$ testCase ->getStoreIdCounter += 1 ;
732
732
return null ;
733
733
}
734
- } ) );
734
+ }) );
735
735
$ customer ->expects ($ this ->once ())
736
736
->method ('setStoreId ' )
737
737
->with ($ defaultStoreId );
@@ -979,42 +979,42 @@ public function testCreateAccountWithPassword()
979
979
->disableOriginalConstructor ()
980
980
->getMock ();
981
981
$ testCase = $ this ;
982
- $ customer ->expects ( $ this ->any () )
983
- ->method ( 'getId ' )
984
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ customerId ) {
985
- if ($ testCase ->getIdCounter > 0 ) {
982
+ $ customer ->expects ($ this ->any ())
983
+ ->method ('getId ' )
984
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ customerId ) {
985
+ if ($ testCase ->getIdCounter > 0 ) {
986
986
return $ customerId ;
987
987
} else {
988
988
$ testCase ->getIdCounter += 1 ;
989
989
return null ;
990
990
}
991
- } ) );
991
+ }) );
992
992
$ customer ->expects ($ this ->atLeastOnce ())
993
993
->method ('getEmail ' )
994
994
->willReturn ($ customerEmail );
995
- $ customer ->expects ( $ this ->any () )
996
- ->method ( 'getWebsiteId ' )
997
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ websiteId ) {
998
- if ($ testCase ->getWebsiteIdCounter > 1 ) {
995
+ $ customer ->expects ($ this ->any ())
996
+ ->method ('getWebsiteId ' )
997
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ websiteId ) {
998
+ if ($ testCase ->getWebsiteIdCounter > 1 ) {
999
999
return $ websiteId ;
1000
1000
} else {
1001
1001
$ testCase ->getWebsiteIdCounter += 1 ;
1002
1002
return null ;
1003
1003
}
1004
- } ) );
1004
+ }) );
1005
1005
$ customer ->expects ($ this ->once ())
1006
1006
->method ('setWebsiteId ' )
1007
1007
->with ($ websiteId );
1008
- $ customer ->expects ( $ this ->any () )
1009
- ->method ( 'getStoreId ' )
1010
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ defaultStoreId ) {
1011
- if ($ testCase ->getStoreIdCounter > 0 ) {
1008
+ $ customer ->expects ($ this ->any ())
1009
+ ->method ('getStoreId ' )
1010
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ defaultStoreId ) {
1011
+ if ($ testCase ->getStoreIdCounter > 0 ) {
1012
1012
return $ defaultStoreId ;
1013
1013
} else {
1014
1014
$ testCase ->getStoreIdCounter += 1 ;
1015
1015
return null ;
1016
1016
}
1017
- } ) );
1017
+ }) );
1018
1018
$ customer ->expects ($ this ->once ())
1019
1019
->method ('setStoreId ' )
1020
1020
->with ($ defaultStoreId );
@@ -1161,16 +1161,16 @@ public function testCreateAccountWithGroupId()
1161
1161
->disableOriginalConstructor ()
1162
1162
->getMock ();
1163
1163
$ testCase = $ this ;
1164
- $ customer ->expects ( $ this ->any () )
1165
- ->method ( 'getId ' )
1166
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ customerId ) {
1167
- if ($ testCase ->getIdCounter > 0 ) {
1164
+ $ customer ->expects ($ this ->any ())
1165
+ ->method ('getId ' )
1166
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ customerId ) {
1167
+ if ($ testCase ->getIdCounter > 0 ) {
1168
1168
return $ customerId ;
1169
1169
} else {
1170
1170
$ testCase ->getIdCounter += 1 ;
1171
1171
return null ;
1172
1172
}
1173
- } ) );
1173
+ }) );
1174
1174
$ customer ->expects ($ this ->atLeastOnce ())
1175
1175
->method ('getGroupId ' )
1176
1176
->willReturn ($ requestedGroupId );
@@ -1183,29 +1183,29 @@ public function testCreateAccountWithGroupId()
1183
1183
$ customer ->expects ($ this ->atLeastOnce ())
1184
1184
->method ('getEmail ' )
1185
1185
->willReturn ($ customerEmail );
1186
- $ customer ->expects ( $ this ->any () )
1187
- ->method ( 'getWebsiteId ' )
1188
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ websiteId ) {
1189
- if ($ testCase ->getWebsiteIdCounter > 1 ) {
1186
+ $ customer ->expects ($ this ->any ())
1187
+ ->method ('getWebsiteId ' )
1188
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ websiteId ) {
1189
+ if ($ testCase ->getWebsiteIdCounter > 1 ) {
1190
1190
return $ websiteId ;
1191
1191
} else {
1192
1192
$ testCase ->getWebsiteIdCounter += 1 ;
1193
1193
return null ;
1194
1194
}
1195
- } ) );
1195
+ }) );
1196
1196
$ customer ->expects ($ this ->once ())
1197
1197
->method ('setWebsiteId ' )
1198
1198
->with ($ websiteId );
1199
- $ customer ->expects ( $ this ->any () )
1200
- ->method ( 'getStoreId ' )
1201
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ defaultStoreId ) {
1202
- if ($ testCase ->getStoreIdCounter > 0 ) {
1199
+ $ customer ->expects ($ this ->any ())
1200
+ ->method ('getStoreId ' )
1201
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ defaultStoreId ) {
1202
+ if ($ testCase ->getStoreIdCounter > 0 ) {
1203
1203
return $ defaultStoreId ;
1204
1204
} else {
1205
1205
$ testCase ->getStoreIdCounter += 1 ;
1206
1206
return null ;
1207
1207
}
1208
- } ) );
1208
+ }) );
1209
1209
$ customer ->expects ($ this ->once ())
1210
1210
->method ('setStoreId ' )
1211
1211
->with ($ defaultStoreId );
@@ -2228,6 +2228,7 @@ private function prepareDateTimeFactory()
2228
2228
}
2229
2229
2230
2230
/**
2231
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
2231
2232
* @return void
2232
2233
* @throws LocalizedException
2233
2234
*/
@@ -2258,42 +2259,42 @@ public function testCreateAccountUnexpectedValueException(): void
2258
2259
->willReturn ([1 , 2 , 3 ]);
2259
2260
$ customer = $ this ->createMock (Customer::class);
2260
2261
$ testCase = $ this ;
2261
- $ customer ->expects ( $ this ->any () )
2262
- ->method ( 'getId ' )
2263
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ customerId ) {
2264
- if ($ testCase ->getIdCounter > 0 ) {
2262
+ $ customer ->expects ($ this ->any ())
2263
+ ->method ('getId ' )
2264
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ customerId ) {
2265
+ if ($ testCase ->getIdCounter > 0 ) {
2265
2266
return $ customerId ;
2266
2267
} else {
2267
2268
$ testCase ->getIdCounter += 1 ;
2268
2269
return null ;
2269
2270
}
2270
- } ) );
2271
+ }) );
2271
2272
$ customer ->expects ($ this ->atLeastOnce ())
2272
2273
->method ('getEmail ' )
2273
2274
->willReturn ($ customerEmail );
2274
- $ customer ->expects ( $ this ->any () )
2275
- ->method ( 'getWebsiteId ' )
2276
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ websiteId ) {
2277
- if ($ testCase ->getWebsiteIdCounter > 1 ) {
2275
+ $ customer ->expects ($ this ->any ())
2276
+ ->method ('getWebsiteId ' )
2277
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ websiteId ) {
2278
+ if ($ testCase ->getWebsiteIdCounter > 1 ) {
2278
2279
return $ websiteId ;
2279
2280
} else {
2280
2281
$ testCase ->getWebsiteIdCounter += 1 ;
2281
2282
return null ;
2282
2283
}
2283
- } ) );
2284
+ }) );
2284
2285
$ customer ->expects ($ this ->once ())
2285
2286
->method ('setWebsiteId ' )
2286
2287
->with ($ websiteId );
2287
- $ customer ->expects ( $ this ->any () )
2288
- ->method ( 'getStoreId ' )
2289
- ->will ( $ this ->returnCallback ( function () use ( $ testCase , $ defaultStoreId ) {
2290
- if ($ testCase ->getStoreIdCounter > 0 ) {
2288
+ $ customer ->expects ($ this ->any ())
2289
+ ->method ('getStoreId ' )
2290
+ ->will ($ this ->returnCallback (function () use ($ testCase , $ defaultStoreId ) {
2291
+ if ($ testCase ->getStoreIdCounter > 0 ) {
2291
2292
return $ defaultStoreId ;
2292
2293
} else {
2293
2294
$ testCase ->getStoreIdCounter += 1 ;
2294
2295
return null ;
2295
2296
}
2296
- } ) );
2297
+ }) );
2297
2298
$ customer ->expects ($ this ->once ())
2298
2299
->method ('setStoreId ' )
2299
2300
->with ($ defaultStoreId );
0 commit comments