public getItemTotal ( string $productName ) : string | ||
$productName | string | |
return | string |
/** * @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.'); }
/** * @Then total price of :productName item should be :productPrice */ public function thisItemPriceShouldBe($productName, $productPrice) { $this->summaryPage->open(); Assert::same($this->summaryPage->getItemTotal($productName), $productPrice); }