Contao\CoreBundle\Test\EventListener\UserSessionListenerTest::testListenerSkipUponSubRequestOnKernelRequest PHP Method

testListenerSkipUponSubRequestOnKernelRequest() public method

Tests that the session bag is not requested upon a sub request.
    public function testListenerSkipUponSubRequestOnKernelRequest()
    {
        $responseEvent = new GetResponseEvent($this->mockKernel(), new Request(), HttpKernelInterface::SUB_REQUEST);
        $session = $this->getMock('Symfony\\Component\\HttpFoundation\\Session\\SessionInterface');
        $session->expects($this->never())->method('getBag');
        $listener = $this->getListener($session);
        $listener->setContainer($this->mockContainerWithContaoScopes(ContaoCoreBundle::SCOPE_BACKEND));
        $listener->onKernelRequest($responseEvent);
    }