/** * Update Session section * * @return bool */ public function updateSession() { if ($this->session && $this->checkGuesser('session') && $this->session->hasLocaleChanged($this->locale)) { if (null !== $this->logger) { $this->logger->info(sprintf('Session var \'%s\' set to [ %s ]', $this->session->getSessionVar(), $this->locale)); } $this->session->setLocale($this->locale); return true; } return false; }
public function testGetSessionVar() { $localeSession = new LocaleSession($this->getMockSession()); $this->assertEquals('lunetics_locale', $localeSession->getSessionVar()); }