Sylius\Behat\Page\Shop\Checkout\CompletePageInterface::hasProductDiscountedUnitPriceBy PHP 메소드

hasProductDiscountedUnitPriceBy() 공개 메소드

public hasProductDiscountedUnitPriceBy ( Sylius\Component\Core\Model\ProductInterface $product, float $amount ) : boolean
$product Sylius\Component\Core\Model\ProductInterface
$amount float
리턴 boolean
    public function hasProductDiscountedUnitPriceBy(ProductInterface $product, $amount);

Usage Example

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