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);
}