You are here

public function LocaleListenerTest::testDefaultLocaleWithoutSession in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php \Symfony\Component\HttpKernel\Tests\EventListener\LocaleListenerTest::testDefaultLocaleWithoutSession()

File

vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php, line 29

Class

LocaleListenerTest

Namespace

Symfony\Component\HttpKernel\Tests\EventListener

Code

public function testDefaultLocaleWithoutSession() {
  $listener = new LocaleListener('fr', null, $this->requestStack);
  $event = $this
    ->getEvent($request = Request::create('/'));
  $listener
    ->onKernelRequest($event);
  $this
    ->assertEquals('fr', $request
    ->getLocale());
}