/** * @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); }
function it_throws_exception_if_discount_info_is_present_on_the_page_but_should_not(CartSummaryPageInterface $cartSummaryPage) { $cartSummaryPage->open()->shouldBeCalled(); $cartSummaryPage->getPromotionTotal()->willReturn('$10.00'); $this->shouldThrow(new FailureException('Expected to get exception, none got.'))->during('thereShouldBeNoDiscount'); }