Fake LocaleManager session in test
This commit is contained in:
parent
68525c9dd8
commit
788e6e93b1
1 changed files with 12 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue