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

_before()

Clears the cache and the IM cache, deletes all workflow items and sets the instance variables.

xmodel_workflows_action
createAction(xmodel_workflows_transition $transition)

Creates the action for the transition and saves it in the DB.

bool|xmodel_workflows_wf_item|null
createItem(xmodel_workflows_process $process)

Starts the workflow of the process, returns the item.

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.

Details

at line 46
protected _before()

Clears the cache and the IM cache, deletes all workflow items and sets the instance variables.

Exceptions

Exception

at line 97
protected xmodel_workflows_action createAction(xmodel_workflows_transition $transition)

Creates the action for the transition and saves it in the DB.

Parameters

xmodel_workflows_transition $transition

Return Value

xmodel_workflows_action

Exceptions

Exception

at line 121
protected bool|xmodel_workflows_wf_item|null createItem(xmodel_workflows_process $process)

Starts the workflow of the process, returns the item.

Parameters

xmodel_workflows_process $process

Return Value

bool|xmodel_workflows_wf_item|null

Exceptions

Exception

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

Parameters

$config

Return Value

xmodel_workflows_wf_item

Exceptions

Exception