class LocaleListenerTest extends TestCase
{ private MockObject&RequestStack
$requestStack;
protected function setUp(): void
{ $this->requestStack =
$this->
createMock(RequestStack::
class);
} public function testIsAnEventSubscriber() { $this->
assertInstanceOf(EventSubscriberInterface::
class,
new LocaleListener($this->requestStack
));
} public function testRegisteredEvent() { $this->
assertEquals( [ KernelEvents::REQUEST =>
[['setDefaultLocale', 100
],
['onKernelRequest', 16
]],
KernelEvents::FINISH_REQUEST =>
[['onKernelFinishRequest', 0
]],
],
LocaleListener::
getSubscribedEvents() );
}