eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\IndexRequestListenerTest::testOnKernelRequestIndexOnIndexPage PHP Method

testOnKernelRequestIndexOnIndexPage() public method

public testOnKernelRequestIndexOnIndexPage ( $requestPath, $configuredIndexPath, $expectedIndexPath )
    public function testOnKernelRequestIndexOnIndexPage($requestPath, $configuredIndexPath, $expectedIndexPath)
    {
        $this->configResolver->expects($this->once())->method('getParameter')->with('index_page')->will($this->returnValue($configuredIndexPath));
        $this->request->attributes->set('semanticPathinfo', $requestPath);
        $this->indexRequestEventListener->onKernelRequestIndex($this->event);
        $this->assertEquals($expectedIndexPath, $this->request->attributes->get('semanticPathinfo'));
        $this->assertTrue($this->request->attributes->get('needsForward'));
    }