/** * @Then /^(its|theirs) price should be decreased by ("[^"]+")$/ * @Then /^(product "[^"]+") price should be decreased by ("[^"]+")$/ */ public function itsPriceShouldBeDecreasedBy(ProductInterface $product, $amount) { $this->summaryPage->open(); $discountedTotal = $this->summaryPage->getItemDiscountedTotal($product->getName()); $total = $this->summaryPage->getItemTotal($product->getName()); Assert::same($discountedTotal, $total - $amount, 'Price after discount should be %2$s, but it is %s.'); }