eZ\Publish\Core\MVC\Symfony\Cache\Tests\Http\EventListener\RelatedLocationsListenerTest::setUp PHP Метод

setUp() защищенный Метод

protected setUp ( )
    protected function setUp()
    {
        parent::setUp();
        $this->repository = $this->getMockBuilder('\\eZ\\Publish\\Core\\Repository\\Repository')->disableOriginalConstructor()->setMethods(['getContentService', 'getLocationService', 'getPermissionResolver'])->getMock();
        $this->contentService = $this->getMock('\\eZ\\Publish\\API\\Repository\\ContentService');
        $this->locationService = $this->getMock('\\eZ\\Publish\\API\\Repository\\LocationService');
        $this->repository->expects($this->any())->method('getContentService')->will($this->returnValue($this->contentService));
        $this->repository->expects($this->any())->method('getLocationService')->will($this->returnValue($this->locationService));
        $this->repository->expects($this->any())->method('getPermissionResolver')->will($this->returnValue($this->getPermissionResolverMock()));
        $this->listener = new RelatedLocationsListener($this->repository);
    }