/** * Assert that discount is equal to expected. * * @param CheckoutCart $checkoutCart * @param Cart $cart * @return void */ public function processAssert(CheckoutCart $checkoutCart, Cart $cart) { $checkoutCart->open(); $checkoutCart->getTotalsBlock()->waitForUpdatedTotals(); \PHPUnit_Framework_Assert::assertEquals(number_format($cart->getDiscount(), 2), $checkoutCart->getTotalsBlock()->getDiscount(), 'Discount amount in the shopping cart not equals to discount amount from fixture.'); }