You are here

function NotificationsBasicTests::testNotificationsBasicPages in Notifications 6.2

Same name and namespace in other branches
  1. 6.4 tests/notifications_api.test \NotificationsBasicTests::testNotificationsBasicPages()
  2. 6 tests/notifications_api.test \NotificationsBasicTests::testNotificationsBasicPages()
  3. 6.3 tests/notifications_api.test \NotificationsBasicTests::testNotificationsBasicPages()
  4. 7 tests/notifications_api.test \NotificationsBasicTests::testNotificationsBasicPages()

Log in as administrator and test page loading

File

tests/notifications_api.test, line 84

Class

NotificationsBasicTests
Class for testing notifications module. Tests basic API functions

Code

function testNotificationsBasicPages() {

  // Log in with administrator permissions
  $user = $this
    ->drupalCreateUser(array(
    'administer notifications',
    'maintain own subscriptions',
    'administer site configuration',
  ));
  $this
    ->drupalLogin($user);
  $this
    ->drupalGet('admin/messaging/notifications');
  $this
    ->assertText('General settings', 'General settings page showing up');
  $this
    ->drupalGet('admin/messaging/notifications/events');
  $this
    ->assertText('events', 'Enabled events page showing up');
  $this
    ->drupalGet('admin/messaging/notifications/intervals');
  $this
    ->assertText('Send intervals', 'Intervals page showing up');
  $this
    ->drupalGet('admin/messaging/subscriptions');
  $this
    ->assertText('Subscriptions by type', 'Subscriptions overview page showing up');
  $this
    ->drupalGet('admin/messaging/subscriptions/admin');

  //$this->assertText('status', 'Subscriptions administration page showing up');
  $this
    ->drupalGet('admin/messaging/subscriptions/queue');
  $this
    ->assertText('Notifications in queue', 'Notifications queue page showing up');
}