MockMayI Class Reference
A mock implementation of MayI, which allows everything with no feedback.
More...
Public Member Functions |
| __construct ($config) |
| Create and return a new MockMayI instance.
|
| be ($context, op5MayI_Actor $actor) |
| Dummy `be` implementation, that just returns this MockMayI instance.
|
| act_upon (op5MayI_Constraints $constraints, $priority=0) |
| Dummy `act_upon` implementation, that just returns this MockMayI instance.
|
| run ($action, array $override=array(), &$messages=false, &$metrics=false) |
| A mocked `run` implementation, that returns true for all actions that are not listed in the "denied_actions" configuration passed to the constructor.
|
Detailed Description
A mock implementation of MayI, which allows everything with no feedback.
Constructor & Destructor Documentation
MockMayI::__construct |
( |
$ |
config |
) |
|
Create and return a new MockMayI instance.
The $config paramater can contain an element "denied_actions" which contains a list of namespaces which this instance will deny on invocation of run()
- Parameters:
-
| $config | array configuration for the new instance |
- Returns:
- MockMayI the constructed instance
Member Function Documentation
MockMayI::act_upon |
( |
op5MayI_Constraints $ |
constraints, |
|
|
$ |
priority = 0 | |
|
) |
| | |
Dummy `act_upon` implementation, that just returns this MockMayI instance.
- Parameters:
-
| $constraints | Unused |
| $priority | Unused |
- Returns:
- MockMayI
MockMayI::be |
( |
$ |
context, |
|
|
op5MayI_Actor $ |
actor | |
|
) |
| | |
Dummy `be` implementation, that just returns this MockMayI instance.
- Parameters:
-
| $context | Unused |
| $actor | Unused |
- Returns:
- MockMayI
MockMayI::run |
( |
$ |
action, |
|
|
array $ |
override = array() , |
|
|
&$ |
messages = false , |
|
|
&$ |
metrics = false | |
|
) |
| | |
A mocked `run` implementation, that returns true for all actions that are not listed in the "denied_actions" configuration passed to the constructor.
- Parameters:
-
| $action | Unused |
| $override | Unused |
| &$messages | Always empty |
| &$metrics | Always empty |
- Returns:
- bool
The documentation for this class was generated from the following file: