You are here

public function LocaleListenerTest::testRequestLocaleIsNotOverridden 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::testRequestLocaleIsNotOverridden()

File

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

Class

LocaleListenerTest

Namespace

Symfony\Component\HttpKernel\Tests\EventListener

Code

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