Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit cfdc0d7

Browse files
committed
#7915: customer objects are equal to eachother after observing event customer_save_after_data_object
1 parent 0055fb8 commit cfdc0d7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/code/Magento/Customer/Test/Unit/Model/ResourceModel/CustomerRepositoryTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ public function testSave()
241241
'save',
242242
]);
243243

244+
$origCustomer = $this->customer;
245+
244246
$this->customer->expects($this->atLeastOnce())
245247
->method('__toArray')
246248
->willReturn(['default_billing', 'default_shipping']);
@@ -417,7 +419,7 @@ public function testSave()
417419
->method('dispatch')
418420
->with(
419421
'customer_save_after_data_object',
420-
['customer_data_object' => $this->customer, 'orig_customer_data_object' => $customerAttributesMetaData]
422+
['customer_data_object' => $this->customer, 'orig_customer_data_object' => $origCustomer]
421423
);
422424

423425
$this->model->save($this->customer);
@@ -475,6 +477,8 @@ public function testSaveWithPasswordHash()
475477
]
476478
);
477479

480+
$origCustomer = $this->customer;
481+
478482
$this->customer->expects($this->atLeastOnce())
479483
->method('__toArray')
480484
->willReturn(['default_billing', 'default_shipping']);
@@ -642,7 +646,7 @@ public function testSaveWithPasswordHash()
642646
->method('dispatch')
643647
->with(
644648
'customer_save_after_data_object',
645-
['customer_data_object' => $this->customer, 'orig_customer_data_object' => $customerAttributesMetaData]
649+
['customer_data_object' => $this->customer, 'orig_customer_data_object' => $origCustomer]
646650
);
647651

648652
$this->model->save($this->customer, $passwordHash);

0 commit comments

Comments
 (0)