Fix tests (#250)

This commit is contained in:
Pierre Rudloff 2019-11-28 00:04:05 +01:00
parent aabcee25f0
commit 7772de5394
5 changed files with 23 additions and 5 deletions

View file

@ -27,7 +27,7 @@ class LocaleManagerTest extends BaseTest
protected function setUp()
{
$_SESSION[LocaleManager::class]['locale'] = 'foo_BAR';
$this->localeManager = new LocaleManager();
$this->localeManager = LocaleManager::getInstance();
}
/**
@ -38,6 +38,7 @@ class LocaleManagerTest extends BaseTest
protected function tearDown()
{
$this->localeManager->unsetLocale();
LocaleManager::destroyInstance();
}
/**
@ -93,6 +94,7 @@ class LocaleManagerTest extends BaseTest
*/
public function testEnv()
{
putenv('LANG=foo_BAR');
$this->localeManager->setLocale(new Locale('foo_BAR'));
$this->assertEquals('foo_BAR', getenv('LANG'));
}