@@ -304,33 +304,28 @@ public function testExecuteWithExistentCustomer()
304
304
],
305
305
'subscription ' => $ subscription ,
306
306
];
307
- $ filteredData = [
307
+ $ extractedData = [
308
308
'entity_id ' => $ customerId ,
309
309
'code ' => 'value ' ,
310
310
'coolness ' => false ,
311
311
'disable_auto_group_change ' => 'false ' ,
312
312
];
313
- $ dataToCompact = [
313
+ $ compactedData = [
314
314
'entity_id ' => $ customerId ,
315
315
'code ' => 'value ' ,
316
316
'coolness ' => false ,
317
317
'disable_auto_group_change ' => 'false ' ,
318
- CustomerInterface::DEFAULT_BILLING => false ,
319
- CustomerInterface::DEFAULT_SHIPPING => false ,
320
- 'confirmation ' => false ,
321
- 'sendemail_store_id ' => false ,
322
- 'extension_attributes ' => false ,
318
+ CustomerInterface::DEFAULT_BILLING => 2 ,
319
+ CustomerInterface::DEFAULT_SHIPPING => 2
323
320
];
324
- $ addressFilteredData = [
321
+ $ addressExtractedData = [
325
322
'entity_id ' => $ addressId ,
326
- 'default_billing ' => 'true ' ,
327
- 'default_shipping ' => 'true ' ,
328
323
'code ' => 'value ' ,
329
324
'coolness ' => false ,
330
325
'region ' => 'region ' ,
331
326
'region_id ' => 'region_id ' ,
332
327
];
333
- $ addressDataToCompact = [
328
+ $ addressCompactedData = [
334
329
'entity_id ' => $ addressId ,
335
330
'default_billing ' => 'true ' ,
336
331
'default_shipping ' => 'true ' ,
@@ -430,11 +425,11 @@ public function testExecuteWithExistentCustomer()
430
425
$ customerFormMock ->expects ($ this ->once ())
431
426
->method ('extractData ' )
432
427
->with ($ this ->requestMock , 'customer ' )
433
- ->willReturn ($ filteredData );
428
+ ->willReturn ($ extractedData );
434
429
$ customerFormMock ->expects ($ this ->once ())
435
430
->method ('compactData ' )
436
- ->with ($ dataToCompact )
437
- ->willReturn ($ filteredData );
431
+ ->with ($ extractedData )
432
+ ->willReturn ($ compactedData );
438
433
$ customerFormMock ->expects ($ this ->once ())
439
434
->method ('getAttributes ' )
440
435
->willReturn ($ attributes );
@@ -445,11 +440,11 @@ public function testExecuteWithExistentCustomer()
445
440
$ customerAddressFormMock ->expects ($ this ->once ())
446
441
->method ('extractData ' )
447
442
->with ($ this ->requestMock , 'address/ ' . $ addressId )
448
- ->willReturn ($ addressFilteredData );
443
+ ->willReturn ($ addressExtractedData );
449
444
$ customerAddressFormMock ->expects ($ this ->once ())
450
445
->method ('compactData ' )
451
- ->with ($ addressDataToCompact )
452
- ->willReturn ($ addressFilteredData );
446
+ ->with ($ addressExtractedData )
447
+ ->willReturn ($ addressCompactedData );
453
448
$ customerAddressFormMock ->expects ($ this ->once ())
454
449
->method ('getAttributes ' )
455
450
->willReturn ($ attributes );
@@ -625,8 +620,6 @@ public function testExecuteWithNewCustomer()
625
620
'_template_ ' => '_template_ ' ,
626
621
$ addressId => [
627
622
'entity_id ' => $ addressId ,
628
- 'default_billing ' => 'false ' ,
629
- 'default_shipping ' => 'false ' ,
630
623
'code ' => 'value ' ,
631
624
'coolness ' => false ,
632
625
'region ' => 'region ' ,
@@ -635,32 +628,12 @@ public function testExecuteWithNewCustomer()
635
628
],
636
629
'subscription ' => $ subscription ,
637
630
];
638
- $ filteredData = [
631
+ $ extractedData = [
639
632
'coolness ' => false ,
640
633
'disable_auto_group_change ' => 'false ' ,
641
634
];
642
- $ dataToCompact = [
643
- 'coolness ' => false ,
644
- 'disable_auto_group_change ' => 'false ' ,
645
- CustomerInterface::DEFAULT_BILLING => false ,
646
- CustomerInterface::DEFAULT_SHIPPING => false ,
647
- 'confirmation ' => false ,
648
- 'sendemail_store_id ' => false ,
649
- 'extension_attributes ' => false ,
650
- ];
651
- $ addressFilteredData = [
635
+ $ addressExtractedData = [
652
636
'entity_id ' => $ addressId ,
653
- 'default_billing ' => 'false ' ,
654
- 'default_shipping ' => 'false ' ,
655
- 'code ' => 'value ' ,
656
- 'coolness ' => false ,
657
- 'region ' => 'region ' ,
658
- 'region_id ' => 'region_id ' ,
659
- ];
660
- $ addressDataToCompact = [
661
- 'entity_id ' => $ addressId ,
662
- 'default_billing ' => 'false ' ,
663
- 'default_shipping ' => 'false ' ,
664
637
'code ' => 'value ' ,
665
638
'coolness ' => false ,
666
639
'region ' => 'region ' ,
@@ -739,11 +712,11 @@ public function testExecuteWithNewCustomer()
739
712
$ customerFormMock ->expects ($ this ->once ())
740
713
->method ('extractData ' )
741
714
->with ($ this ->requestMock , 'customer ' )
742
- ->willReturn ($ filteredData );
715
+ ->willReturn ($ extractedData );
743
716
$ customerFormMock ->expects ($ this ->once ())
744
717
->method ('compactData ' )
745
- ->with ($ dataToCompact )
746
- ->willReturn ($ filteredData );
718
+ ->with ($ extractedData )
719
+ ->willReturn ($ extractedData );
747
720
$ customerFormMock ->expects ($ this ->once ())
748
721
->method ('getAttributes ' )
749
722
->willReturn ($ attributes );
@@ -754,11 +727,11 @@ public function testExecuteWithNewCustomer()
754
727
$ customerAddressFormMock ->expects ($ this ->once ())
755
728
->method ('extractData ' )
756
729
->with ($ this ->requestMock , 'address/ ' . $ addressId )
757
- ->willReturn ($ addressFilteredData );
730
+ ->willReturn ($ addressExtractedData );
758
731
$ customerAddressFormMock ->expects ($ this ->once ())
759
732
->method ('compactData ' )
760
- ->with ($ addressDataToCompact )
761
- ->willReturn ($ addressFilteredData );
733
+ ->with ($ addressExtractedData )
734
+ ->willReturn ($ addressExtractedData );
762
735
$ customerAddressFormMock ->expects ($ this ->once ())
763
736
->method ('getAttributes ' )
764
737
->willReturn ($ attributes );
@@ -910,19 +883,10 @@ public function testExecuteWithNewCustomerAndValidationException()
910
883
],
911
884
'subscription ' => $ subscription ,
912
885
];
913
- $ filteredData = [
886
+ $ extractedData = [
914
887
'coolness ' => false ,
915
888
'disable_auto_group_change ' => 'false ' ,
916
889
];
917
- $ dataToCompact = [
918
- 'coolness ' => false ,
919
- 'disable_auto_group_change ' => 'false ' ,
920
- CustomerInterface::DEFAULT_BILLING => false ,
921
- CustomerInterface::DEFAULT_SHIPPING => false ,
922
- 'confirmation ' => false ,
923
- 'sendemail_store_id ' => false ,
924
- 'extension_attributes ' => false ,
925
- ];
926
890
927
891
/** @var AttributeMetadataInterface|\PHPUnit_Framework_MockObject_MockObject $customerFormMock */
928
892
$ attributeMock = $ this ->getMockBuilder (
@@ -971,11 +935,11 @@ public function testExecuteWithNewCustomerAndValidationException()
971
935
$ customerFormMock ->expects ($ this ->once ())
972
936
->method ('extractData ' )
973
937
->with ($ this ->requestMock , 'customer ' )
974
- ->willReturn ($ filteredData );
938
+ ->willReturn ($ extractedData );
975
939
$ customerFormMock ->expects ($ this ->once ())
976
940
->method ('compactData ' )
977
- ->with ($ dataToCompact )
978
- ->willReturn ($ filteredData );
941
+ ->with ($ extractedData )
942
+ ->willReturn ($ extractedData );
979
943
$ customerFormMock ->expects ($ this ->once ())
980
944
->method ('getAttributes ' )
981
945
->willReturn ($ attributes );
@@ -1062,19 +1026,10 @@ public function testExecuteWithNewCustomerAndLocalizedException()
1062
1026
],
1063
1027
'subscription ' => $ subscription ,
1064
1028
];
1065
- $ filteredData = [
1029
+ $ extractedData = [
1066
1030
'coolness ' => false ,
1067
1031
'disable_auto_group_change ' => 'false ' ,
1068
1032
];
1069
- $ dataToCompact = [
1070
- 'coolness ' => false ,
1071
- 'disable_auto_group_change ' => 'false ' ,
1072
- CustomerInterface::DEFAULT_BILLING => false ,
1073
- CustomerInterface::DEFAULT_SHIPPING => false ,
1074
- 'confirmation ' => false ,
1075
- 'sendemail_store_id ' => false ,
1076
- 'extension_attributes ' => false ,
1077
- ];
1078
1033
1079
1034
/** @var AttributeMetadataInterface|\PHPUnit_Framework_MockObject_MockObject $customerFormMock */
1080
1035
$ attributeMock = $ this ->getMockBuilder (
@@ -1124,11 +1079,11 @@ public function testExecuteWithNewCustomerAndLocalizedException()
1124
1079
$ customerFormMock ->expects ($ this ->once ())
1125
1080
->method ('extractData ' )
1126
1081
->with ($ this ->requestMock , 'customer ' )
1127
- ->willReturn ($ filteredData );
1082
+ ->willReturn ($ extractedData );
1128
1083
$ customerFormMock ->expects ($ this ->once ())
1129
1084
->method ('compactData ' )
1130
- ->with ($ dataToCompact )
1131
- ->willReturn ($ filteredData );
1085
+ ->with ($ extractedData )
1086
+ ->willReturn ($ extractedData );
1132
1087
$ customerFormMock ->expects ($ this ->once ())
1133
1088
->method ('getAttributes ' )
1134
1089
->willReturn ($ attributes );
@@ -1214,18 +1169,9 @@ public function testExecuteWithNewCustomerAndException()
1214
1169
],
1215
1170
'subscription ' => $ subscription ,
1216
1171
];
1217
- $ filteredData = [
1218
- 'coolness ' => false ,
1219
- 'disable_auto_group_change ' => 'false ' ,
1220
- ];
1221
- $ dataToCompact = [
1172
+ $ extractedData = [
1222
1173
'coolness ' => false ,
1223
1174
'disable_auto_group_change ' => 'false ' ,
1224
- CustomerInterface::DEFAULT_BILLING => false ,
1225
- CustomerInterface::DEFAULT_SHIPPING => false ,
1226
- 'confirmation ' => false ,
1227
- 'sendemail_store_id ' => false ,
1228
- 'extension_attributes ' => false ,
1229
1175
];
1230
1176
1231
1177
/** @var AttributeMetadataInterface|\PHPUnit_Framework_MockObject_MockObject $customerFormMock */
@@ -1275,11 +1221,11 @@ public function testExecuteWithNewCustomerAndException()
1275
1221
$ customerFormMock ->expects ($ this ->once ())
1276
1222
->method ('extractData ' )
1277
1223
->with ($ this ->requestMock , 'customer ' )
1278
- ->willReturn ($ filteredData );
1224
+ ->willReturn ($ extractedData );
1279
1225
$ customerFormMock ->expects ($ this ->once ())
1280
1226
->method ('compactData ' )
1281
- ->with ($ dataToCompact )
1282
- ->willReturn ($ filteredData );
1227
+ ->with ($ extractedData )
1228
+ ->willReturn ($ extractedData );
1283
1229
$ customerFormMock ->expects ($ this ->once ())
1284
1230
->method ('getAttributes ' )
1285
1231
->willReturn ($ attributes );
0 commit comments