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

@ -75,4 +75,15 @@ class LocaleManagerTest extends TestCase
$this->assertInstanceOf(Locale::class, $locale);
$this->assertEquals('foo_BAR', (string) $locale);
}
/**
* Test the unsetLocale function.
*
* @return void
*/
public function testUnsetLocale()
{
$this->localeManager->unsetLocale();
$this->assertNull($this->localeManager->getLocale());
}
}