Skip to content

Commit

Permalink
Fake LocaleManager session in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudloff committed May 30, 2017
1 parent 68525c9 commit 788e6e9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/LocaleManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ protected function setUp()
$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.
*
Expand Down

0 comments on commit 788e6e9

Please sign in to comment.