ActionIntegrationTestBase
class ActionIntegrationTestBase extends BaseUnitTest
This base class can be used for integration tests to check the workflow actions in a workflow process.
Properties
protected | $PROCESS_ID | ||
protected | $TRANSITION_IDENTIFIER | ||
protected | $ACTION_HOOK_NAME | ||
protected | $ACTION_TITLE | ||
protected | $ACTION_IDENTIFIER | ||
protected xm_workflows | $instance | ||
protected xmodel_workflows_process | $process | ||
protected xmodel_workflows_transition | $transition |
Methods
Clears the cache and the IM cache, deletes all workflow items and sets the instance variables.
Creates the action for the transition and saves it in the DB.
Starts the workflow of the process, returns the item.
Performs the workflow process like the daemon should with a new action on each run:
- Creates the action
- sets the config
- starts a workflow process and returns a new item
- sets the User with the ID 1 as the creator
- runs the daemon action.
Details
at line 46
protected
_before()
Clears the cache and the IM cache, deletes all workflow items and sets the instance variables.
at line 97
protected xmodel_workflows_action
createAction(xmodel_workflows_transition $transition)
Creates the action for the transition and saves it in the DB.
at line 121
protected bool|xmodel_workflows_wf_item|null
createItem(xmodel_workflows_process $process)
Starts the workflow of the process, returns the item.
at line 72
protected xmodel_workflows_wf_item
performAction($config)
Performs the workflow process like the daemon should with a new action on each run:
- Creates the action
- sets the config
- starts a workflow process and returns a new item
- sets the User with the ID 1 as the creator
- runs the daemon action.
- deletes the action
- returns the re-loaded item