PHP Class Psecio\PropAuth\EnforcerTest

Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: psecio/propauth

Public Methods

Method Description
testAllowsSubjectInvalid ( ) Test that a false is returned when the user is not allowed by the policy
testAllowsSubjectValid ( ) Test that a subject is correctly allowed when the policy matches on "allows" call
testGetPeopertyValueMethod ( ) Test the getting of a value from a getter on the subject
testGetPropertyGetPropertyMethod ( ) Test the getting of a peoperty on the subject via a "getPropery" method
testGetPropertyValuePublicProperty ( ) Test the getting of a value as a public property on the subject
testPolicyNameNotFoundAllows ( ) Test that an exception is thrown when teh policy name isn't found
testPolicyNameNotFoundDenies ( ) Test that an exception is thrown when the policy is not in the set on a "denies" call
testSubjectDeniedInvalid ( ) Test that, when the policy actually matches, the result of a "denies" call is false
testSubjectIsDenied ( ) Test that a subject is correctly denined (the policy is not a match)
testTriggerErrorWithoutPolicies ( ) Test that a warning is thrown when the policy is empty (no checks)

Method Details

testAllowsSubjectInvalid() public method

Test that a false is returned when the user is not allowed by the policy

testAllowsSubjectValid() public method

Test that a subject is correctly allowed when the policy matches on "allows" call

testGetPeopertyValueMethod() public method

Test the getting of a value from a getter on the subject

testGetPropertyGetPropertyMethod() public method

Test the getting of a peoperty on the subject via a "getPropery" method

testGetPropertyValuePublicProperty() public method

Test the getting of a value as a public property on the subject

testPolicyNameNotFoundAllows() public method

Test that an exception is thrown when teh policy name isn't found

testPolicyNameNotFoundDenies() public method

Test that an exception is thrown when the policy is not in the set on a "denies" call

testSubjectDeniedInvalid() public method

Test that, when the policy actually matches, the result of a "denies" call is false

testSubjectIsDenied() public method

Test that a subject is correctly denined (the policy is not a match)
public testSubjectIsDenied ( )

testTriggerErrorWithoutPolicies() public method

Test that a warning is thrown when the policy is empty (no checks)