eZ\Bundle\EzPublishRestBundle\Tests\EventListener\EventListenerTest::getRequestAttributesMock PHP Method

getRequestAttributesMock() protected method

protected getRequestAttributesMock ( ) : Symfony\Component\HttpFoundation\ParameterBag | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
return Symfony\Component\HttpFoundation\ParameterBag | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
    protected function getRequestAttributesMock()
    {
        if (!isset($this->requestAttributesMock)) {
            $this->requestAttributesMock = $this->getMock('Symfony\\Component\\HttpFoundation\\ParameterBag');
            $this->requestAttributesMock->expects($this->once())->method('get')->with('is_rest_request')->will($this->returnValue($this->isRestRequest));
        }
        return $this->requestAttributesMock;
    }