/** * @Given /^I (?:add|added) (this product) to the cart$/ * @Given I added product :product to the cart * @Given /^I (?:have|had) (product "[^"]+") in the cart$/ * @When I add product :product to the cart */ public function iAddProductToTheCart(ProductInterface $product) { $this->productShowPage->open(['slug' => $product->getSlug()]); $this->productShowPage->addToCart(); $this->sharedStorage->set('product', $product); }