TriggerContentTestCase::actionInfo

7 trigger.test TriggerContentTestCase::actionInfo($action)

Returns some info about each of the content actions.

This is helper function for testActionsContent().

Parameters

$action: The name of the action to return info about.

Return value

An associative array of info about the action.

File

modules/trigger/trigger.test, line 149
Tests for trigger.module.

Code

function actionInfo($action) {
  $info = array(
    'node_publish_action' => array(
      'property' => 'status', 
      'expected' => 1, 
      'name' => t('publish content'),
    ), 
    'node_unpublish_action' => array(
      'property' => 'status', 
      'expected' => 0, 
      'name' => t('unpublish content'),
    ), 
    'node_make_sticky_action' => array(
      'property' => 'sticky', 
      'expected' => 1, 
      'name' => t('make content sticky'),
    ), 
    'node_make_unsticky_action' => array(
      'property' => 'sticky', 
      'expected' => 0, 
      'name' => t('make content unsticky'),
    ), 
    'node_promote_action' => array(
      'property' => 'promote', 
      'expected' => 1, 
      'name' => t('promote content to front page'),
    ), 
    'node_unpromote_action' => array(
      'property' => 'promote', 
      'expected' => 0, 
      'name' => t('remove content from front page'),
    ),
  );
  return $info[$action];
}
Login or register to post comments