function it_ensures_there_is_no_discount_info_on_the_page(CartSummaryPage $cartSummaryPage) { $cartSummaryPage->open()->shouldBeCalled(); $cartSummaryPage->getPromotionTotal()->willThrow(new ElementNotFoundException('"promotion total" element is not present on the page')); $this->thereShouldBeNoDiscount(); }
/** * @Then my cart promotions should be :promotionsTotal * @Then my discount should be :promotionsTotal */ public function myDiscountShouldBe($promotionsTotal) { $this->cartSummaryPage->open(); expect($this->cartSummaryPage->getPromotionTotal())->toBe($promotionsTotal); }