Esempio n. 1
0
 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());
 }
Esempio n. 3
0
 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');
 }
Esempio n. 4
0
 /**
  * {@inheritdoc}
  */
 public function setCurrencyCode($currencyCode)
 {
     return $this->storage->setData(self::STORAGE_KEY, $currencyCode);
 }
Esempio n. 5
0
 /**
  * {@inheritdoc}
  */
 public function set(ChannelInterface $channel, $currencyCode)
 {
     $this->storage->setData($this->provideKey($channel), $currencyCode);
 }
Esempio n. 6
0
 /**
  * {@inheritdoc}
  */
 public function setLocale($locale)
 {
     return $this->storage->setData(self::STORAGE_KEY, $locale);
 }
Esempio n. 7
0
 /**
  * {@inheritdoc}
  */
 public function setCurrentCartIdentifier(CartInterface $cart)
 {
     $this->storage->setData(self::STORAGE_KEY, $cart->getIdentifier());
 }