Skip to content

Commit

Permalink
#7915: customer objects are equal to eachother after observing event …
Browse files Browse the repository at this point in the history
…customer_save_after_data_object
  • Loading branch information
RomaKis committed Oct 23, 2017
1 parent d22516d commit 0c0fcbf
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ public function testSave()
'save',
]);

$origCustomer = $this->customer;

$this->customer->expects($this->atLeastOnce())
->method('__toArray')
->willReturn(['default_billing', 'default_shipping']);
Expand Down Expand Up @@ -406,7 +408,7 @@ public function testSave()
->method('dispatch')
->with(
'customer_save_after_data_object',
['customer_data_object' => $this->customer, 'orig_customer_data_object' => $customerAttributesMetaData]
['customer_data_object' => $this->customer, 'orig_customer_data_object' => $origCustomer]
);

$this->model->save($this->customer);
Expand Down Expand Up @@ -464,6 +466,8 @@ public function testSaveWithPasswordHash()
]
);

$origCustomer = $this->customer;

$this->customer->expects($this->atLeastOnce())
->method('__toArray')
->willReturn(['default_billing', 'default_shipping']);
Expand Down Expand Up @@ -631,7 +635,7 @@ public function testSaveWithPasswordHash()
->method('dispatch')
->with(
'customer_save_after_data_object',
['customer_data_object' => $this->customer, 'orig_customer_data_object' => $customerAttributesMetaData]
['customer_data_object' => $this->customer, 'orig_customer_data_object' => $origCustomer]
);

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

0 comments on commit 0c0fcbf

Please sign in to comment.