eZ\Bundle\EzPublishRestBundle\Tests\EventListener\CsrfListenerTest::getSessionMock PHP Method

getSessionMock() protected method

protected getSessionMock ( ) : Symfony\Component\HttpFoundation\Session\SessionInterface | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
return Symfony\Component\HttpFoundation\Session\SessionInterface | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
    protected function getSessionMock()
    {
        if (!isset($this->sessionMock)) {
            $this->sessionMock = $this->getMock('Symfony\\Component\\HttpFoundation\\Session\\SessionInterface');
            $this->sessionMock->expects($this->atLeastOnce())->method('isStarted')->will($this->returnValue($this->sessionIsStarted));
        }
        return $this->sessionMock;
    }