Bristol SU Support Package
|
Public Member Functions | |
pass ($userModel=null, $groupModel=null, $roleModel=null) | |
fail ($userModel=null, $groupModel=null, $roleModel=null) | |
shouldBeCalled ($userModel=null, $groupModel=null, $roleModel=null) | |
otherwise (bool $value=true) | |
alwaysPass () | |
alwaysFail () | |
evaluate ($userModel=null, $groupModel=null, $roleModel=null) | |
__destruct () | |
Private Member Functions | |
parseArguments ($userModel=null, $groupModel=null, $roleModel=null) | |
Private Attributes | |
$passes = [] | |
$fails = [] | |
$required = [] | |
$overrideResult | |
$default = false | |
Handles collecting and evaluating collections of user, group or role models
Definition at line 13 of file LogicTesterResult.php.
BristolSU\Support\Testing\LogicTester\LogicTesterResult::__destruct | ( | ) |
Test the required assertions have all been called
Definition at line 165 of file LogicTesterResult.php.
BristolSU\Support\Testing\LogicTester\LogicTesterResult::alwaysFail | ( | ) |
Should the result of the evaluation always be false?
Definition at line 129 of file LogicTesterResult.php.
BristolSU\Support\Testing\LogicTester\LogicTesterResult::alwaysPass | ( | ) |
Should the result of the evaluation always be true?
Definition at line 121 of file LogicTesterResult.php.
BristolSU\Support\Testing\LogicTester\LogicTesterResult::evaluate | ( | $userModel = null , |
|
$groupModel = null , |
|||
$roleModel = null |
|||
) |
Evaluate a user/group/role combination
User | null | $userModel | User model |
Group | null | $groupModel | Group model |
Role | null | $roleModel | Role model |
Definition at line 142 of file LogicTesterResult.php.
References BristolSU\Support\Testing\LogicTester\LogicTesterResult\$default, BristolSU\Support\Testing\LogicTester\LogicTesterResult\$overrideResult, and BristolSU\Support\Testing\LogicTester\LogicTesterResult\parseArguments().
BristolSU\Support\Testing\LogicTester\LogicTesterResult::fail | ( | $userModel = null , |
|
$groupModel = null , |
|||
$roleModel = null |
|||
) |
The given combination of user, group and role should return false when tested
User | null | $userModel | User model |
Group | null | $groupModel | Group model |
Role | null | $roleModel | Role model |
Definition at line 86 of file LogicTesterResult.php.
References BristolSU\Support\Testing\LogicTester\LogicTesterResult\parseArguments().
BristolSU\Support\Testing\LogicTester\LogicTesterResult::otherwise | ( | bool | $value = true | ) |
Set the default value if a user/group/role are given that haven't been previously registered
bool | $value | Default value to return |
Definition at line 112 of file LogicTesterResult.php.
|
private |
Return an array of the user id, group id and role id.
User | null | $userModel | User model |
Group | null | $groupModel | Group model |
Role | null | $roleModel | Role model |
Definition at line 73 of file LogicTesterResult.php.
Referenced by BristolSU\Support\Testing\LogicTester\LogicTesterResult\evaluate(), BristolSU\Support\Testing\LogicTester\LogicTesterResult\fail(), BristolSU\Support\Testing\LogicTester\LogicTesterResult\pass(), and BristolSU\Support\Testing\LogicTester\LogicTesterResult\shouldBeCalled().
BristolSU\Support\Testing\LogicTester\LogicTesterResult::pass | ( | $userModel = null , |
|
$groupModel = null , |
|||
$roleModel = null |
|||
) |
The given combination of user, group and role should return true when tested
User | null | $userModel | User model |
Group | null | $groupModel | Group model |
Role | null | $roleModel | Role model |
Definition at line 59 of file LogicTesterResult.php.
References BristolSU\Support\Testing\LogicTester\LogicTesterResult\parseArguments().
BristolSU\Support\Testing\LogicTester\LogicTesterResult::shouldBeCalled | ( | $userModel = null , |
|
$groupModel = null , |
|||
$roleModel = null |
|||
) |
The given combination must be called for the assertion to pass
User | null | $userModel | User model |
Group | null | $groupModel | Group model |
Role | null | $roleModel | Role model |
Definition at line 100 of file LogicTesterResult.php.
References BristolSU\Support\Testing\LogicTester\LogicTesterResult\parseArguments().
|
private |
Definition at line 49 of file LogicTesterResult.php.
Referenced by BristolSU\Support\Testing\LogicTester\LogicTesterResult\evaluate().
|
private |
Definition at line 28 of file LogicTesterResult.php.
|
private |
Definition at line 42 of file LogicTesterResult.php.
Referenced by BristolSU\Support\Testing\LogicTester\LogicTesterResult\evaluate().
|
private |
Definition at line 21 of file LogicTesterResult.php.
|
private |
Definition at line 35 of file LogicTesterResult.php.