106 calls to DrupalWebTestCase::drupalLogout()
AccessDeniedTestCase::testAccessDenied in modules/system/system.test
AnnounceFeedTestInvalidJsonTestCase::testInvalidFeedResponse in modules/announcements_feed/tests/announce_feed_test.test
Test the announcements feed with invalid JSON or non-existing JSON URL.
AnnounceFeedTestSanitizationTestCase::testSanitizedFeedResponse in modules/announcements_feed/tests/announce_feed_test.test
Test the announcements feed with malicious content.
AnnounceFeedTestValidateJsonFeed::testAnnounceFeedUpdatedAndRemoved in modules/announcements_feed/tests/announce_feed_test.test
Testing the feed with Updated and Removed JSON feeds.
AnnounceFeedTestValidatePermissions::testAnnounceWithPermission in modules/announcements_feed/tests/announce_feed_test.test
Testing the announcements page with access announcements permission.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 1389

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function drupalLogout() {

  // Make a request to the logout page, and redirect to the user page, the
  // idea being if you were properly logged out you should be seeing a login
  // screen.
  $this
    ->drupalGet('user/logout');
  $this
    ->drupalGet('user');
  $pass = $this
    ->assertField('name', t('Username field found.'), t('Logout'));
  $pass = $pass && $this
    ->assertField('pass', t('Password field found.'), t('Logout'));
  if ($pass) {
    $this->loggedInUser = FALSE;
  }
}