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