You are here

public function TranslatorListenerTest::testLocaleIsSetInOnKernelRequest in Zircon Profile 8

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

File

vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php, line 33

Class

TranslatorListenerTest

Namespace

Symfony\Component\HttpKernel\Tests\EventListener

Code

public function testLocaleIsSetInOnKernelRequest() {
  $this->translator
    ->expects($this
    ->once())
    ->method('setLocale')
    ->with($this
    ->equalTo('fr'));
  $event = new GetResponseEvent($this
    ->createHttpKernel(), $this
    ->createRequest('fr'), HttpKernelInterface::MASTER_REQUEST);
  $this->listener
    ->onKernelRequest($event);
}