/**
  * Run Change customer password test.
  *
  * @param Customer $initialCustomer
  * @param Customer $customer
  * @return void
  */
 public function test(Customer $initialCustomer, Customer $customer)
 {
     // Preconditions
     $initialCustomer->persist();
     // Steps
     $this->objectManager->create('Mage\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $initialCustomer])->run();
     $this->cmsIndex->getTopLinksBlock()->openAccount();
     $this->cmsIndex->getLinksBlock()->openLink('My Account');
     $this->customerAccountIndex->getInfoBlock()->openChangePassword();
     $this->customerAccountEdit->getAccountInfoForm()->fill($customer);
     $this->customerAccountEdit->getAccountInfoForm()->submit();
 }
 /**
  * Assert that confirmation message is present.
  *
  * @param Customer $customer
  * @param CustomerAccountEdit $customerAccountEdit
  * @return void
  */
 public function processAssert(Customer $customer, CustomerAccountEdit $customerAccountEdit)
 {
     \PHPUnit_Framework_Assert::assertEquals(self::CONFIRMATION_MESSAGE, $customerAccountEdit->getAccountInfoForm()->getValidationMessages($customer)['password_confirmation'], 'Wrong password confirmation validation text message.');
 }
 /**
  * Assert that fail message is present.
  *
  * @param CustomerAccountEdit $customerAccountEdit
  * @return void
  */
 public function processAssert(CustomerAccountEdit $customerAccountEdit)
 {
     \PHPUnit_Framework_Assert::assertEquals(self::FAIL_MESSAGE, $customerAccountEdit->getMessages()->getErrorMessages());
 }