File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
dev/tests/functional/tests/app/Magento/Customer/Test/TestCase Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,13 @@ private function prepareCustomer(
112
112
Customer $ customer ,
113
113
Customer $ initialCustomer
114
114
) {
115
- $ data = $ customer ->hasData ()
116
- ? array_replace_recursive ($ initialCustomer ->getData (), $ customer ->getData ())
117
- : $ initialCustomer ->getData ();
118
- $ groupId = $ customer ->hasData ('group_id ' ) ? $ customer : $ initialCustomer ;
119
- $ data ['group_id ' ] = ['customerGroup ' => $ groupId ->getDataFieldConfig ('group_id ' )['source ' ]->getCustomerGroup ()];
115
+ if (!$ customer ->hasData ()) {
116
+ return $ initialCustomer ;
117
+ }
118
+ $ data = array_replace_recursive ($ initialCustomer ->getData (), $ customer ->getData ());
119
+ $ data ['group_id ' ] = [
120
+ 'customerGroup ' => $ initialCustomer ->getDataFieldConfig ('group_id ' )['source ' ]->getCustomerGroup ()
121
+ ];
120
122
121
123
return $ this ->fixtureFactory ->createByCode ('customer ' , ['data ' => $ data ]);
122
124
}
@@ -155,8 +157,6 @@ public function test(
155
157
$ this ->customerAddressEdit ->getEditForm ()->fill ($ address );
156
158
$ this ->customerAddressEdit ->getEditForm ()->saveAddress ();
157
159
158
- return [
159
- 'customer ' => $ this ->prepareCustomer ($ customer , $ initialCustomer )
160
- ];
160
+ return ['customer ' => $ this ->prepareCustomer ($ customer , $ initialCustomer )];
161
161
}
162
162
}
You can’t perform that action at this time.
0 commit comments