Improve LocaleMiddlewareTest

Add a way to unset the current locale
This commit is contained in:
Pierre Rudloff 2017-11-10 12:18:20 +01:00
parent c994f8ac9a
commit 8848a8dbf3
3 changed files with 57 additions and 9 deletions

View file

@ -95,4 +95,13 @@ class LocaleManager
$this->curLocale = $locale;
$this->sessionSegment->set('locale', $locale);
}
/**
* Unset the current locale.
*/
public function unsetLocale()
{
$this->curLocale = null;
$this->sessionSegment->clear('locale');
}
}