getItemUnitPrice() public method

public getItemUnitPrice ( string $productName ) : string
$productName string
return string
Ejemplo n.º 1
0
 /**
  * @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.');
 }
Ejemplo n.º 2
0
 /**
  * @Then /^I should see "([^"]+)" with unit price ("[^"]+") in my cart$/
  */
 public function iShouldSeeProductWithUnitPriceInMyCart($productName, $unitPrice)
 {
     Assert::same($this->summaryPage->getItemUnitPrice($productName), $unitPrice, 'The unit price of product should be %2$s, but it is %s.');
 }