Improve LocaleMiddlewareTest
Add a way to unset the current locale
This commit is contained in:
parent
c994f8ac9a
commit
8848a8dbf3
3 changed files with 57 additions and 9 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue