@@ -55,7 +55,8 @@ protected function setUp()
55
55
->setCity ('CityM ' )
56
56
->setFirstname ('John ' )
57
57
->setLastname ('Smith ' )
58
- ->setCompany ('CompanyName ' );
58
+ ->setCompany ('CompanyName ' )
59
+ ->setCustomAttributes ([]);
59
60
60
61
/* XXX: would it be better to have a clear method for this? */
61
62
$ address2 = $ this ->_addressFactory ->create ()
@@ -68,7 +69,8 @@ protected function setUp()
68
69
->setCity ('CityX ' )
69
70
->setTelephone ('3234676 ' )
70
71
->setFirstname ('John ' )
71
- ->setLastname ('Smith ' );
72
+ ->setLastname ('Smith ' )
73
+ ->setCustomAttributes ([]);
72
74
73
75
$ this ->_expectedAddresses = [$ address , $ address2 ];
74
76
}
@@ -111,7 +113,7 @@ public function testSaveAddressChanges()
111
113
*/
112
114
public function testSaveAddressesIdSetButNotAlreadyExisting ()
113
115
{
114
- $ proposedAddress = $ this ->_createSecondAddressBuilder ()->setId (4200 );
116
+ $ proposedAddress = $ this ->_createSecondAddress ()->setId (4200 );
115
117
$ this ->repository ->save ($ proposedAddress );
116
118
}
117
119
@@ -145,7 +147,7 @@ public function testGetAddressByIdBadAddressId()
145
147
*/
146
148
public function testSaveNewAddress ()
147
149
{
148
- $ proposedAddress = $ this ->_createSecondAddressBuilder ()->setCustomerId (1 );
150
+ $ proposedAddress = $ this ->_createSecondAddress ()->setCustomerId (1 );
149
151
150
152
$ returnedAddress = $ this ->repository ->save ($ proposedAddress );
151
153
$ this ->assertNotNull ($ returnedAddress ->getId ());
@@ -209,7 +211,7 @@ public function testSaveNewInvalidAddress()
209
211
210
212
public function testSaveAddressesCustomerIdNotExist ()
211
213
{
212
- $ proposedAddress = $ this ->_createSecondAddressBuilder ()->setCustomerId (4200 );
214
+ $ proposedAddress = $ this ->_createSecondAddress ()->setCustomerId (4200 );
213
215
try {
214
216
$ this ->repository ->save ($ proposedAddress );
215
217
$ this ->fail ('Expected exception not thrown ' );
@@ -220,7 +222,7 @@ public function testSaveAddressesCustomerIdNotExist()
220
222
221
223
public function testSaveAddressesCustomerIdInvalid ()
222
224
{
223
- $ proposedAddress = $ this ->_createSecondAddressBuilder ()->setCustomerId ('this_is_not_a_valid_id ' );
225
+ $ proposedAddress = $ this ->_createSecondAddress ()->setCustomerId ('this_is_not_a_valid_id ' );
224
226
try {
225
227
$ this ->repository ->save ($ proposedAddress );
226
228
$ this ->fail ('Expected exception not thrown ' );
@@ -403,7 +405,7 @@ private function _createFirstAddress()
403
405
*
404
406
* @return \Magento\Customer\Api\Data\AddressInterface
405
407
*/
406
- private function _createSecondAddressBuilder ()
408
+ private function _createSecondAddress ()
407
409
{
408
410
$ address = $ this ->_addressFactory ->create ();
409
411
$ this ->dataObjectHelper ->mergeDataObjects (
0 commit comments