Contao\CoreBundle\Test\EventListener\AddToSearchIndexListenerTest::testWithContaoFramework PHP Method

testWithContaoFramework() public method

Tests that the listener does use the response if the Contao framework is booted.
    public function testWithContaoFramework()
    {
        $this->framework->expects($this->any())->method('isInitialized')->willReturn(true);
        $listener = new AddToSearchIndexListener($this->framework);
        $event = $this->mockPostResponseEvent();
        $event->expects($this->once())->method('getResponse')->willReturn(new Response());
        $listener->onKernelTerminate($event);
    }