Fake LocaleManager session in test

This commit is contained in:
Pierre Rudloff 2017-05-31 00:56:53 +02:00
parent 68525c9dd8
commit 788e6e93b1
1 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,18 @@ class LocaleManagerTest extends \PHPUnit_Framework_TestCase
$this->localeManager = new LocaleManager();
}
/**
* Test the getSupportedLocales function.
*
* @return void
*/
public function testConstructorWithCookies()
{
$_SESSION['Alltube\LocaleManager']['locale'] = 'foo_BAR';
$localeManager = new LocaleManager([]);
$this->assertEquals('foo_BAR', (string) $localeManager->getLocale());
}
/**
* Test the getSupportedLocales function.
*