function it_can_get_current_locale(StorageInterface $storage) { $storage->setData(Argument::any(), 'en_US')->shouldBeCalled()->willReturn(); $this->setCurrentLocale('en_US'); $storage->getData(Argument::cetera())->shouldBeCalled()->willReturn('en_US'); $this->getCurrentLocale()->shouldReturn('en_US'); }
/** * {@inheritdoc} */ public function send(ConfirmationSubjectInterface $subject) { $subject->confirmationDisableAccess(); $subject->setConfirmationType($this->getType()); $subject->confirmationRequest($token = $this->tokenProvider->generateUniqueToken()); $this->sendToken($subject, $token); if (!$this->isValid) { return; } $this->manager->persist($subject); $this->manager->flush(); $this->storage->setData(self::STORE_KEY, $subject->getConfirmationToken()); }
function it_sets_locale_for_given_channel(StorageInterface $storage, ChannelInterface $channel) { $channel->getCode()->willReturn('web'); $storage->setData('_locale_web', 'BTC')->shouldBeCalled(); $this->set($channel, 'BTC'); }
/** * {@inheritdoc} */ public function setCurrencyCode($currencyCode) { return $this->storage->setData(self::STORAGE_KEY, $currencyCode); }
/** * {@inheritdoc} */ public function set(ChannelInterface $channel, $currencyCode) { $this->storage->setData($this->provideKey($channel), $currencyCode); }
/** * {@inheritdoc} */ public function setLocale($locale) { return $this->storage->setData(self::STORAGE_KEY, $locale); }
/** * {@inheritdoc} */ public function setCurrentCartIdentifier(CartInterface $cart) { $this->storage->setData(self::STORAGE_KEY, $cart->getIdentifier()); }