/** * @Then /^the ("[^"]+" product) should have unit price discounted by ("\$\d+")$/ */ public function theShouldHaveUnitPriceDiscountedFor(ProductInterface $product, $amount) { Assert::true($this->summaryPage->hasProductDiscountedUnitPriceBy($product, $amount), sprintf('Product %s should have discounted price by %s, but it does not have.', $product->getName(), $amount)); }