protected function DrupalWebTestCase::drupalLogout in Drupal 7
97 calls to DrupalWebTestCase::drupalLogout()
- AccessDeniedTestCase::testAccessDenied in modules/
system/ system.test - BasicMinimalUpdatePath::testBasicMinimalUpdate in modules/
simpletest/ tests/ upgrade/ upgrade.test - Tests a successful point release update.
- BasicStandardUpdatePath::testBasicStandardUpdate in modules/
simpletest/ tests/ upgrade/ upgrade.test - Tests a successful point release update.
- BasicUpgradePath::testBasicUpgrade in modules/
simpletest/ tests/ upgrade/ upgrade.test - Test a successful upgrade.
- BlockCacheTestCase::testCacheGlobal in modules/
block/ block.test - Test DRUPAL_CACHE_GLOBAL.
File
- modules/
simpletest/ drupal_web_test_case.php, line 1330
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;
}
}