protected function setUp()
{
parent::setUp();
$this->repositoryMock = $this->getMockBuilder('eZ\\Publish\\Core\\Repository\\Repository')->disableOriginalConstructor()->setMethods(array('getRoleService', 'getCurrentUser', 'getPermissionResolver'))->getMock();
$this->roleServiceMock = $this->getMock('eZ\\Publish\\API\\Repository\\RoleService');
$this->repositoryMock->expects($this->any())->method('getRoleService')->will($this->returnValue($this->roleServiceMock));
$this->repositoryMock->expects($this->any())->method('getPermissionResolver')->will($this->returnValue($this->getPermissionResolverMock()));
}