/** * @Given /^(that channel) allows to shop using the "([^"]+)" currency$/ * @Given /^(that channel) allows to shop using "([^"]+)" and "([^"]+)" currencies$/ * @Given /^(that channel) allows to shop using "([^"]+)", "([^"]+)" and "([^"]+)" currencies$/ */ public function thatChannelAllowsToShopUsingAndCurrencies(ChannelInterface $channel, ...$currenciesCodes) { foreach ($channel->getCurrencies() as $currency) { $channel->removeCurrency($currency); } foreach ($currenciesCodes as $currencyCode) { $channel->addCurrency($this->provideCurrency($currencyCode)); } $this->channelManager->flush(); }