/** * @Given /^(this user) bought(?: this product| those products)$/ */ public function thisUserBought(ShopUserInterface $user) { $this->sharedSecurityService->performActionAsShopUser($user, function () { $this->iProceedSelectingPaymentMethod(); $this->iConfirmMyOrder(); }); }
/** * @Given /^(this user) has (\d+) (products "[^"]+") in the cart$/ * @Given /^(this user) added (\d+) (products "[^"]+") to the cart$/ */ public function thisCustomerHasAddedProductsToTheCart(ShopUserInterface $shopUser, $quantity, ProductInterface $product) { $this->sharedSecurityService->performActionAsShopUser($shopUser, function () use($quantity, $product) { $this->iAddQuantityOfProductsToTheCart($quantity, $product); }); }
/** * @Given /^(this user) has ("[^"]+" product) in the cart$/ */ public function thisUserHasProductInTheCart(ShopUserInterface $user, ProductInterface $product) { $this->sharedSecurityService->performActionAsShopUser($user, function () use($product) { $this->iAddProductToTheCart($product); }); }