Open Journal Systems
3.3.0
|
Public Member Functions | |
mockEffect () | |
mockGetContext () | |
Public Member Functions inherited from PKPTestCase | |
getActualOutput () | |
Protected Member Functions | |
getAuthorizationContextManipulationPolicy () | |
getMockedRegistryKeys () | |
getMockRequest ($requestedOp, $context=null, $user=null) | |
Protected Member Functions inherited from PKPTestCase | |
getMockedDAOs () | |
mockRequest ($path='index/test-page/test-op', $userId=null) | |
setTestConfiguration ($config, $configPath='config') | |
setUp () | |
tearDown () | |
Additional Inherited Members | |
Data Fields inherited from PKPTestCase | |
$mockedRegistryKeys = array() | |
$registryBackup = array() | |
Abstract base test class that provides infrastructure for several types of policy tests.
Definition at line 24 of file PolicyTestCase.inc.php.
|
protected |
Create an authorization context manipulation policy.
Definition at line 67 of file PolicyTestCase.inc.php.
Referenced by mockEffect(), AuthorizationDecisionManagerTest\testAuthorizationContext(), and RoleBasedHandlerOperationPolicyTest\testRoleAuthorization().
|
protected |
Override this method if you want to backup/restore registry entries before/after the test.
Reimplemented from PKPTestCase.
Definition at line 40 of file PolicyTestCase.inc.php.
|
protected |
Instantiate a mock request to the given operation.
$requestedOp | string the requested operation |
$context | array request context object(s) to be returned by the router. |
$user | User a user to be put into the registry. |
Definition at line 109 of file PolicyTestCase.inc.php.
References Registry\set().
Referenced by PKPPublicAccessPolicyTest\testPKPPublicAccessPolicy(), and RoleBasedHandlerOperationPolicyTest\testRoleAuthorization().
PolicyTestCase::mockEffect | ( | ) |
Callback method that will be called in place of the effect() method of a mock policy.
Definition at line 87 of file PolicyTestCase.inc.php.
References getAuthorizationContextManipulationPolicy().
PolicyTestCase::mockGetContext | ( | ) |
Callback used by PKPRouter created in getMockRequest().
Definition at line 150 of file PolicyTestCase.inc.php.