eZ\Bundle\EzPublishRestBundle\Tests\Routing\OptionsLoaderTest::getOptionsLoader PHP Method

getOptionsLoader() protected method

Returns a partially mocked OptionsLoader, with the import method mocked.
protected getOptionsLoader ( ) : OptionsLoader | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
return eZ\Bundle\EzPublishRestBundle\Routing\OptionsLoader | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
    protected function getOptionsLoader()
    {
        $mock = $this->getMockBuilder('eZ\\Bundle\\EzPublishRestBundle\\Routing\\OptionsLoader')->setConstructorArgs(array($this->getRouteCollectionMapperMock()))->setMethods(array('import'))->getMock();
        $mock->expects($this->any())->method('import')->with($this->anything(), $this->anything())->will($this->returnValue(new RouteCollection()));
        return $mock;
    }