1 backdrop_web_test_case.php protected BackdropWebTestCase::backdropLogout()

File

core/modules/simpletest/backdrop_web_test_case.php, line 1452

Class

BackdropWebTestCase
Test case for typical Backdrop tests.

Code

protected function backdropLogout() {
  // 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->backdropGet('user/logout');
  $this->backdropGet('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;
  }
}