/**
  * Assert that gift card is redeemable on frontend.
  *
  * @param CustomerAccountIndex $customerAccountIndex
  * @param Customer $customer
  * @param string $code
  * @return void
  */
 public function processAssert(CustomerAccountIndex $customerAccountIndex, Customer $customer, $code)
 {
     $this->objectManager->create('Mage\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $customer])->run();
     $customerAccountIndex->getAccountNavigationBlock()->openNavigationItem('Gift Card');
     $customerAccountIndex->getRedeemBlock()->redeemGiftCard($code);
     \PHPUnit_Framework_Assert::assertEquals($customerAccountIndex->getMessagesBlock()->getSuccessMessages(), sprintf(self::SUCCESS_MESSAGE, $code));
 }
 /**
  * Assert that created gift card account can be verified on the frontend on My Account page.
  *
  * @param Customer $customer
  * @param CustomerAccountIndex $customerAccountIndex
  * @param GiftCardAccount $giftCardAccount
  * @param string $code
  * @return void
  */
 public function processAssert(Customer $customer, CustomerAccountIndex $customerAccountIndex, GiftCardAccount $giftCardAccount, $code)
 {
     $this->objectManager->create('Mage\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $customer])->run();
     $customerAccountIndex->getAccountNavigationBlock()->openNavigationItem('Gift Card');
     $data = $giftCardAccount->getData();
     $customerAccountIndex->getRedeemBlock()->checkStatusAndBalance($code);
     $fixtureData = ['code' => $code, 'balance' => $data['balance'], 'date_expires' => $data['date_expires']];
     \PHPUnit_Framework_Assert::assertEquals($fixtureData, $customerAccountIndex->getCheckBlock()->getGiftCardAccountData($fixtureData));
 }