コード例 #1
0
 /**
  * @When /^I (?:|want to )view all variants of (this product)$/
  * @When /^I view(?:| all) variants of the (product "[^"]+")$/
  */
 public function iWantToViewAllVariantsOfThisProduct(ProductInterface $product)
 {
     $this->indexPage->open(['productId' => $product->getId()]);
 }
コード例 #2
0
 /**
  * @Then the :variant variant of :product product should have :amount items on hold
  */
 public function theVariantOfProductShouldHaveItemsOnHold(ProductVariantInterface $variant, ProductInterface $product, $amount)
 {
     $this->indexPage->open(['productId' => $product->getId()]);
     Assert::same($amount, $this->indexPage->getOnHoldQuantityFor($variant), sprintf('Unexpected on hold quantity for "%s" variant. It should be "%s" but is "%s"', $variant->getName(), $amount, $this->indexPage->getOnHandQuantityFor($variant)));
 }
コード例 #3
0
 /**
  * @Then the :variant variant of :product product should have :amount items on hold
  */
 public function theVariantOfProductShouldHaveItemsOnHold(ProductVariantInterface $variant, ProductInterface $product, $amount)
 {
     $this->indexPage->open(['productId' => $product->getId()]);
     $this->assertOnHoldQuantityOfVariant((int) $amount, $variant);
 }