You are here

function NotificationsTestCase::notificationsProcessQueue in Notifications 6.4

Same name and namespace in other branches
  1. 7 tests/notifications_test_case.inc \NotificationsTestCase::notificationsProcessQueue()
2 calls to NotificationsTestCase::notificationsProcessQueue()
NotificationsAnonymousTests::testAnonymousSubscriptions in tests/notifications_anonymous.test
NotificationsCustomTests::testCustomSubscriptions in tests/notifications_custom.test

File

tests/notifications_test_case.inc, line 71
Base class for Notifications Tests

Class

NotificationsTestCase
@file Base class for Notifications Tests

Code

function notificationsProcessQueue($before = 0, $after = 0) {
  if ($before) {
    $this
      ->assertTableRows('notifications_queue', $before);
  }
  $count = notifications_queue()
    ->process_run();
  $this
    ->assertTrue($count, "Processed {$count} rows from notifications queue.");
  $this
    ->assertTableRows('notifications_queue', $after);
}