Skip to content

Commit

Permalink
CC-10770: Rename getCharacterSetCustomerPasswordPolicy => getCustomer…
Browse files Browse the repository at this point in the history
…PasswordCharacterSet
  • Loading branch information
Anton Sakharov committed Nov 23, 2020
1 parent be73a69 commit 7903088
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CharacterSetCustomerPasswordPolicy implements CustomerPasswordPolicyInterf
*/
public function __construct(CustomerConfig $customerConfig)
{
$this->regularExpression = $customerConfig->getCharacterSetCustomerPasswordPolicy();
$this->regularExpression = $customerConfig->getCustomerPasswordCharacterSet();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Spryker/Zed/Customer/CustomerConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function getCustomerReferenceDefaults()
*
* @return string
*/
public function getCharacterSetCustomerPasswordPolicy(): string
public function getCustomerPasswordCharacterSet(): string
{
return '/^.*$/';
}
Expand Down
20 changes: 10 additions & 10 deletions tests/SprykerTest/Zed/Customer/Business/CustomerFacadeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public function testAddCustomerNotAddsCustomerWhenPasswordInDenyList(): void
}

/**
* @uses \Spryker\Zed\Customer\CustomerConfig::getCharacterSetCustomerPasswordPolicy()
* @uses \Spryker\Zed\Customer\CustomerConfig::getCustomerPasswordCharacterSet()
*
* @return void
*/
Expand All @@ -380,7 +380,7 @@ public function testAddCustomerNotAddsCustomerWhenPasswordCharacterSetWrong(): v
$customerTransfer = (new CustomerBuilder([
CustomerTransfer::PASSWORD => static::VALUE_CHARACTER_SET_WRONG_PASSWORD,
]))->build();
$this->tester->mockConfigMethod('getCharacterSetCustomerPasswordPolicy', static::CHARACTER_SET_REGEXP);
$this->tester->mockConfigMethod('getCustomerPasswordCharacterSet', static::CHARACTER_SET_REGEXP);

// Act
$customerResponseTransfer = $this->tester->getFacade()->addCustomer($customerTransfer);
Expand Down Expand Up @@ -531,7 +531,7 @@ public function testRegisterCustomerNotRegistersCustomerWhenPasswordInDenyList()
}

/**
* @uses \Spryker\Zed\Customer\CustomerConfig::getCharacterSetCustomerPasswordPolicy()
* @uses \Spryker\Zed\Customer\CustomerConfig::getCustomerPasswordCharacterSet()
*
* @return void
*/
Expand All @@ -541,7 +541,7 @@ public function testRegisterCustomerNotRegistersCustomerWhenPasswordCharacterSet
$customerTransfer = (new CustomerBuilder([
CustomerTransfer::PASSWORD => static::VALUE_CHARACTER_SET_WRONG_PASSWORD,
]))->build();
$this->tester->mockConfigMethod('getCharacterSetCustomerPasswordPolicy', static::CHARACTER_SET_REGEXP);
$this->tester->mockConfigMethod('getCustomerPasswordCharacterSet', static::CHARACTER_SET_REGEXP);

// Act
$customerResponseTransfer = $this->tester->getFacade()->registerCustomer($customerTransfer);
Expand Down Expand Up @@ -597,7 +597,7 @@ public function testRegisterCustomerRegistersCustomerWhenPasswordNotInDenyList()
}

/**
* @uses \Spryker\Zed\Customer\CustomerConfig::getCharacterSetCustomerPasswordPolicy()
* @uses \Spryker\Zed\Customer\CustomerConfig::getCustomerPasswordCharacterSet()
*
* @return void
*/
Expand All @@ -607,7 +607,7 @@ public function testRegisterCustomerRegistersCustomerWhenPasswordCharacterSetVal
$customerTransfer = (new CustomerBuilder([
CustomerTransfer::PASSWORD => static::VALUE_VALID_PASSWORD,
]))->build();
$this->tester->mockConfigMethod('getCharacterSetCustomerPasswordPolicy', static::CHARACTER_SET_REGEXP);
$this->tester->mockConfigMethod('getCustomerPasswordCharacterSet', static::CHARACTER_SET_REGEXP);

// Act
$customerResponseTransfer = $this->tester->getFacade()->registerCustomer($customerTransfer);
Expand Down Expand Up @@ -724,7 +724,7 @@ public function testUpdateCustomerNotUpdatesCustomerWhenPasswordInDenyList(): vo
}

/**
* @uses \Spryker\Zed\Customer\CustomerConfig::getCharacterSetCustomerPasswordPolicy()
* @uses \Spryker\Zed\Customer\CustomerConfig::getCustomerPasswordCharacterSet()
*
* @return void
*/
Expand All @@ -736,7 +736,7 @@ public function testUpdateCustomerNotUpdatesCustomerWhenPasswordCharacterSetWron
]);
$customerTransfer->setPassword(static::VALUE_VALID_PASSWORD)
->setNewPassword(static::VALUE_CHARACTER_SET_WRONG_PASSWORD);
$this->tester->mockConfigMethod('getCharacterSetCustomerPasswordPolicy', static::CHARACTER_SET_REGEXP);
$this->tester->mockConfigMethod('getCustomerPasswordCharacterSet', static::CHARACTER_SET_REGEXP);

// Act
$customerResponseTransfer = $this->tester->getFacade()->updateCustomer($customerTransfer);
Expand Down Expand Up @@ -942,7 +942,7 @@ public function testUpdateCustomerPasswordNotUpdatesCustomerPasswordWhenPassword
}

/**
* @uses \Spryker\Zed\Customer\CustomerConfig::getCharacterSetCustomerPasswordPolicy()
* @uses \Spryker\Zed\Customer\CustomerConfig::getCustomerPasswordCharacterSet()
*
* @return void
*/
Expand All @@ -954,7 +954,7 @@ public function testUpdateCustomerPasswordNotUpdatesCustomerPasswordWhenPassword
]);
$customerTransfer->setPassword(static::VALUE_VALID_PASSWORD)
->setNewPassword(static::VALUE_CHARACTER_SET_WRONG_PASSWORD);
$this->tester->mockConfigMethod('getCharacterSetCustomerPasswordPolicy', static::CHARACTER_SET_REGEXP);
$this->tester->mockConfigMethod('getCustomerPasswordCharacterSet', static::CHARACTER_SET_REGEXP);

// Act
$customerResponseTransfer = $this->tester->getFacade()->updateCustomer($customerTransfer);
Expand Down

0 comments on commit 7903088

Please sign in to comment.