@@ -243,9 +243,11 @@ public function testSetAccountData()
243
243
);
244
244
$ customerGroupMock ->expects ($ this ->once ())->method ('getTaxClassId ' )->will ($ this ->returnValue ($ taxClassId ));
245
245
$ customerFormMock = $ this ->getMock ('Magento\Customer\Model\Metadata\Form ' , [], [], '' , false );
246
- $ customerFormMock ->expects ($ this ->any ())->method ('getAttributes ' )->will ($ this ->returnValue ($ attributeMocks ));
246
+ $ customerFormMock ->expects ($ this ->any ())
247
+ ->method ('getAttributes ' )
248
+ ->will ($ this ->returnValue ([$ attributeMocks [1 ]]));
247
249
$ customerFormMock ->expects ($ this ->any ())->method ('extractData ' )->will ($ this ->returnValue ([]));
248
- $ customerFormMock ->expects ($ this ->any ())->method ('restoreData ' )->will ($ this ->returnValue ([]));
250
+ $ customerFormMock ->expects ($ this ->any ())->method ('restoreData ' )->will ($ this ->returnValue ([' group_id ' => 1 ]));
249
251
250
252
$ customerFormMock ->expects ($ this ->any ())
251
253
->method ('prepareRequest ' )
@@ -254,7 +256,7 @@ public function testSetAccountData()
254
256
$ customerMock = $ this ->getMock ('Magento\Customer\Api\Data\CustomerInterface ' , [], [], '' , false );
255
257
$ this ->customerMapper ->expects ($ this ->atLeastOnce ())
256
258
->method ('toFlatArray ' )
257
- ->
willReturn ([
'email ' => ' [email protected] ' , ' group_id ' => 1 , ' gender ' =>
1 ]);
259
+ ->willReturn (['group_id ' => 1 ]);
258
260
259
261
260
262
$ quoteMock = $ this ->getMock ('Magento\Quote\Model\Quote ' , [], [], '' , false );
@@ -263,7 +265,6 @@ public function testSetAccountData()
263
265
->method ('addData ' )
264
266
->with (
265
267
[
266
- 'customer_email ' => $ attributes [0 ][1 ],
267
268
'customer_group_id ' => $ attributes [1 ][1 ],
268
269
'customer_tax_class_id ' => $ taxClassId
269
270
]
@@ -272,7 +273,7 @@ public function testSetAccountData()
272
273
->method ('populateWithArray ' )
273
274
->with (
274
275
$ customerMock ,
275
- [
'email ' => ' [email protected] ' , ' group_id ' => 1 , ' gender ' =>
1 ],
276
+ ['group_id ' => 1 ],
276
277
'\Magento\Customer\Api\Data\CustomerInterface '
277
278
);
278
279
@@ -284,7 +285,7 @@ public function testSetAccountData()
284
285
->method ('getById ' )
285
286
->will ($ this ->returnValue ($ customerGroupMock ));
286
287
287
- $ this ->adminOrderCreate ->setAccountData ([]);
288
+ $ this ->adminOrderCreate ->setAccountData ([' group_id ' => 1 ]);
288
289
}
289
290
290
291
public function testUpdateQuoteItemsNotArray ()
0 commit comments