/** * @Given /^there should be no discount$/ */ public function thereShouldBeNoDiscount() { $this->summaryPage->open(); try { $this->summaryPage->getPromotionTotal(); } catch (ElementNotFoundException $exception) { return; } throw new \DomainException('Get promotion total should throw an exception!'); }
/** * @Then my cart promotions should be :promotionsTotal * @Then my discount should be :promotionsTotal */ public function myDiscountShouldBe($promotionsTotal) { $this->summaryPage->open(); Assert::same($this->summaryPage->getPromotionTotal(), $promotionsTotal, 'Promotion total value should be %2$s, but it is %s.'); }