/** * @Given there is user :email identified by :password, with :country as shipping country */ public function thereIsUserWithShippingCountry($email, $password, $country) { $user = $this->userFactory->create($email, $password); $customer = $user->getCustomer(); $customer->setShippingAddress($this->createAddress($customer->getFirstName(), $customer->getLastName(), $country)); $this->sharedStorage->set('user', $user); $this->userRepository->add($user); }