Skip to content

Commit

Permalink
Fix code stryling issues magento#18170
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro-ch committed Sep 26, 2018
1 parent 54b6382 commit 406d000
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 4 additions & 0 deletions app/code/Magento/Customer/Model/AccountManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,8 @@ protected function createPasswordHash($password)
}

/**
* Get attribute validator
*
* @return Backend
*/
private function getEavValidator()
Expand Down Expand Up @@ -1168,6 +1170,8 @@ protected function getWebsiteStoreId($customer, $defaultStoreId = null)
}

/**
* Get available email template types
*
* @return array
* @deprecated 100.1.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1079,9 +1079,7 @@ protected function prepareInitiatePasswordReset($email, $templateIdentifier, $se
{
$websiteId = 1;
$addressId = 5;

$datetime = $this->prepareDateTimeFactory();

$customerData = ['key' => 'value'];
$customerName = 'Customer Name';

Expand All @@ -1091,7 +1089,6 @@ protected function prepareInitiatePasswordReset($email, $templateIdentifier, $se
$this->store->expects($this->any())
->method('getId')
->willReturn($storeId);

$this->storeManager->expects($this->any())
->method('getStore')
->willReturn($this->store);
Expand Down Expand Up @@ -1121,7 +1118,6 @@ protected function prepareInitiatePasswordReset($email, $templateIdentifier, $se
$customer->expects($this->any())
->method('getAddresses')
->willReturn([$address]);

$this->customerRepository->expects($this->once())
->method('get')
->willReturn($customer);
Expand All @@ -1132,7 +1128,6 @@ protected function prepareInitiatePasswordReset($email, $templateIdentifier, $se
$addressModel->expects($this->once())
->method('setShouldIgnoreValidation')
->with(true);

$this->customerRepository->expects($this->once())
->method('get')
->with($email, $websiteId)
Expand All @@ -1141,16 +1136,13 @@ protected function prepareInitiatePasswordReset($email, $templateIdentifier, $se
->method('save')
->with($customer)
->willReturnSelf();

$this->random->expects($this->once())
->method('getUniqueHash')
->willReturn($hash);

$this->customerViewHelper->expects($this->any())
->method('getCustomerName')
->with($customer)
->willReturn($customerName);

$this->customerSecure->expects($this->any())
->method('setRpToken')
->with($hash)
Expand All @@ -1167,12 +1159,10 @@ protected function prepareInitiatePasswordReset($email, $templateIdentifier, $se
->method('setData')
->with('name', $customerName)
->willReturnSelf();

$this->customerRegistry->expects($this->any())
->method('retrieveSecureData')
->with($customerId)
->willReturn($this->customerSecure);

$this->dataObjectProcessor->expects($this->any())
->method('buildOutputDataArray')
->with($customer, \Magento\Customer\Api\Data\CustomerInterface::class)
Expand Down

0 comments on commit 406d000

Please sign in to comment.