예제 #1
0
 /**
  * @Given I have :quantity products :product in the cart
  * @When I add :quantity products :product to the cart
  */
 public function iAddProductsToTheCart(ProductInterface $product, $quantity)
 {
     $this->productShowPage->open(['product' => $product]);
     $this->productShowPage->addToCartWithQuantity($quantity);
 }
예제 #2
0
 /**
  * @Then I should not be able to access product :product
  */
 public function iShouldNotBeAbleToAccessProduct(ProductInterface $product)
 {
     $this->productShowPage->tryToOpen(['product' => $product]);
     expect($this->productShowPage->isOpen(['product' => $product]))->toBe(false);
 }