コード例 #1
0
 /**
  * Assert that customer balance history is changed.
  *
  * @param CustomerIndex $customerIndex
  * @param Customer $customer
  * @param CustomerBalance $customerBalance
  * @param CustomerEdit $customerEdit
  * @return void
  */
 public function processAssert(CustomerIndex $customerIndex, Customer $customer, CustomerBalance $customerBalance, CustomerEdit $customerEdit)
 {
     $customerIndex->open();
     $filter = ['email' => $customer->getEmail()];
     $customerIndex->getCustomerGridBlock()->searchAndOpen($filter);
     $customerForm = $customerEdit->getCustomerBalanceForm();
     $customerForm->openTab('store_credit');
     \PHPUnit_Framework_Assert::assertTrue($customerEdit->getBalanceHistoryGrid()->verifyCustomerBalanceGrid($customerBalance), '"Balance History" grid not contains correct information.');
 }
コード例 #2
0
 /**
  * Assert that customer balance amount is changed.
  *
  * @param CustomerIndex $customerIndex
  * @param Customer $customer
  * @param CustomerBalance $customerBalance
  * @param CustomerEdit $customerEdit
  * @return void
  */
 public function processAssert(CustomerIndex $customerIndex, Customer $customer, CustomerBalance $customerBalance, CustomerEdit $customerEdit)
 {
     $customerIndex->open();
     $filter = ['email' => $customer->getEmail()];
     $customerIndex->getCustomerGridBlock()->searchAndOpen($filter);
     $customerForm = $customerEdit->getCustomerBalanceForm();
     $customerForm->openTab('store_credit');
     \PHPUnit_Framework_Assert::assertTrue($customerForm->getStoreCreditTab()->isStoreCreditBalanceVisible($customerBalance->getAmountDelta()), '"Store Credit Balance" grid not displays total amount of store credit balance.');
 }