You are here

function NotificationsTemplatesTests::notificationsCreateNodeEvent in Notifications 6

Same name and namespace in other branches
  1. 6.4 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
  2. 6.2 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
  3. 6.3 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
  4. 7 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
1 call to NotificationsTemplatesTests::notificationsCreateNodeEvent()
NotificationsTemplatesTests::testNotificationsTemplates in tests/notifications_templates.test
Play with creating, retrieving, deleting a pair subscriptions

File

tests/notifications_templates.test, line 178

Class

NotificationsTemplatesTests
Class for testing notifications templates and message composition.

Code

function notificationsCreateNodeEvent($action, $node) {
  static $eid = 0;
  return (object) array(
    'eid' => ++$eid,
    'type' => 'node',
    'action' => $action,
    'node' => $node,
    'params' => array(
      'nid' => $node->nid,
    ),
    'objects' => array(
      'node' => $node,
    ),
  );
}