function NotificationsTemplatesTests::notificationsCreateNodeEvent in Notifications 6.4
Same name and namespace in other branches
- 6 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
- 6.2 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
- 6.3 tests/notifications_templates.test \NotificationsTemplatesTests::notificationsCreateNodeEvent()
- 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 204
Class
- NotificationsTemplatesTests
- Class for testing notifications templates and message composition.
Code
function notificationsCreateNodeEvent($action, $node) {
static $eid = 0;
$event = new Notifications_Event(array(
'type' => 'node',
'action' => $action,
'node' => $node,
'params' => array(
'nid' => $node->nid,
),
'objects' => array(
'node' => $node,
),
));
$event
->save();
return $event;
}