private function generateRepositoryMockForSectionIdentifier($sectionIdentifier)
{
$sectionServiceMock = $this->getMockBuilder('eZ\\Publish\\API\\Repository\\SectionService')->disableOriginalConstructor()->getMock();
$sectionServiceMock->expects($this->once())->method('loadSection')->will($this->returnValue($this->getMockBuilder('eZ\\Publish\\API\\Repository\\Values\\Content\\Section')->setConstructorArgs(array(array('identifier' => $sectionIdentifier)))->getMockForAbstractClass()));
$repository = $this->getRepositoryMock();
$repository->expects($this->once())->method('getSectionService')->will($this->returnValue($sectionServiceMock));
$repository->expects($this->any())->method('getPermissionResolver')->will($this->returnValue($this->getPermissionResolverMock()));
return $repository;
}