PHP Class eZ\Publish\Core\Repository\Tests\Service\Mock\RoleTest

Inheritance: extends Base
Show file Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$partlyMockedLimitationService eZ\Publish\Core\Repository\RoleService
$partlyMockedRoleService eZ\Publish\Core\Repository\RoleService

Public Methods

Method Description
testAddPolicyThrowsLimitationValidationException ( ) Test for the addPolicy() method.
testAssignRoleGroupToUserThrowsBadStateException ( ) Test for the assignRoleToUserGroup() method.
testAssignRoleToUser ( ) Test for the assignRoleToUser() method.
testAssignRoleToUserGroup ( ) Test for the assignRoleToUserGroup() method.
testAssignRoleToUserGroupThrowsLimitationValidationException ( ) Test for the assignRoleToUserGroup() method.
testAssignRoleToUserGroupThrowsUnauthorizedException ( ) Test for the assignRoleToUserGroup() method.
testAssignRoleToUserGroupWithNullLimitation ( ) Test for the assignRoleToUserGroup() method.
testAssignRoleToUserGroupWithRollback ( ) Test for the assignRoleToUserGroup() method.
testAssignRoleToUserThrowsBadStateException ( ) Test for the assignRoleToUser() method.
testAssignRoleToUserThrowsLimitationValidationException ( ) Test for the assignRoleToUser() method.
testAssignRoleToUserThrowsUnauthorizedException ( ) Test for the assignRoleToUser() method.
testAssignRoleToUserWithNullLimitation ( ) Test for the assignRoleToUser() method.
testAssignRoleToUserWithRollback ( ) Test for the assignRoleToUser() method.
testCreateRoleThrowsLimitationValidationException ( ) Test for the createRole() method.
testDeletePolicy ( ) Test for the deletePolicy() method.
testDeletePolicyThrowsUnauthorizedException ( ) Test for the deletePolicy() method.
testDeletePolicyWithRollback ( ) Test for the deletePolicy() method.
testRemovePolicy ( ) Test for the removePolicy() method.
testRemovePolicyThrowsInvalidArgumentException ( ) Test for the removePolicy() method.
testRemovePolicyThrowsUnauthorizedException ( ) Test for the removePolicy() method.
testRemovePolicyWithRollback ( ) Test for the removePolicy() method.
testUpdatePolicyThrowsLimitationValidationException ( ) Test for the updatePolicy() method.

Protected Methods

Method Description
getPartlyMockedLimitationService ( array $methods = null, array $settings = [] ) : LimitationService | PHPUnit_Framework_MockObject_MockObject Return mocked LimitationService.
getPartlyMockedRoleService ( array $methods = null, array $settings = [] ) : RoleService | PHPUnit_Framework_MockObject_MockObject Returns the role service to test with $methods mocked.

Method Details

getPartlyMockedLimitationService() protected method

Return mocked LimitationService.
protected getPartlyMockedLimitationService ( array $methods = null, array $settings = [] ) : LimitationService | PHPUnit_Framework_MockObject_MockObject
$methods array
$settings array
return eZ\Publish\Core\Repository\Helper\LimitationService | PHPUnit_Framework_MockObject_MockObject

getPartlyMockedRoleService() protected method

Injected Repository comes from {@see \getRepositoryMock()} and persistence handler from {@see \getPersistenceMock()}
protected getPartlyMockedRoleService ( array $methods = null, array $settings = [] ) : RoleService | PHPUnit_Framework_MockObject_MockObject
$methods array
$settings array
return eZ\Publish\Core\Repository\RoleService | PHPUnit_Framework_MockObject_MockObject

testAddPolicyThrowsLimitationValidationException() public method

Test for the addPolicy() method.

testAssignRoleGroupToUserThrowsBadStateException() public method

Test for the assignRoleToUserGroup() method.

testAssignRoleToUser() public method

Test for the assignRoleToUser() method.

testAssignRoleToUserGroup() public method

Test for the assignRoleToUserGroup() method.

testAssignRoleToUserGroupThrowsLimitationValidationException() public method

Test for the assignRoleToUserGroup() method.

testAssignRoleToUserGroupThrowsUnauthorizedException() public method

Test for the assignRoleToUserGroup() method.

testAssignRoleToUserGroupWithNullLimitation() public method

Test for the assignRoleToUserGroup() method.

testAssignRoleToUserGroupWithRollback() public method

Test for the assignRoleToUserGroup() method.

testAssignRoleToUserThrowsBadStateException() public method

Test for the assignRoleToUser() method.

testAssignRoleToUserThrowsLimitationValidationException() public method

Test for the assignRoleToUser() method.

testAssignRoleToUserThrowsUnauthorizedException() public method

Test for the assignRoleToUser() method.

testAssignRoleToUserWithNullLimitation() public method

Test for the assignRoleToUser() method.

testAssignRoleToUserWithRollback() public method

Test for the assignRoleToUser() method.

testCreateRoleThrowsLimitationValidationException() public method

Test for the createRole() method.

testDeletePolicy() public method

Test for the deletePolicy() method.
public testDeletePolicy ( )

testDeletePolicyThrowsUnauthorizedException() public method

Test for the deletePolicy() method.

testDeletePolicyWithRollback() public method

Test for the deletePolicy() method.

testRemovePolicy() public method

Test for the removePolicy() method.
public testRemovePolicy ( )

testRemovePolicyThrowsInvalidArgumentException() public method

Test for the removePolicy() method.

testRemovePolicyThrowsUnauthorizedException() public method

Test for the removePolicy() method.

testRemovePolicyWithRollback() public method

Test for the removePolicy() method.

testUpdatePolicyThrowsLimitationValidationException() public method

Test for the updatePolicy() method.

Property Details

$partlyMockedLimitationService protected property

protected RoleService,eZ\Publish\Core\Repository $partlyMockedLimitationService
return eZ\Publish\Core\Repository\RoleService

$partlyMockedRoleService protected property

protected RoleService,eZ\Publish\Core\Repository $partlyMockedRoleService
return eZ\Publish\Core\Repository\RoleService