public function LoginTest::testForceLogout in Restrict Login or Role Access by IP Address 8.4
File
- src/
Tests/ LoginTest.php, line 83
Class
Namespace
Drupal\restrict_by_ip\TestsCode
public function testForceLogout() {
// First login
$this
->drupalLogin($this->regularUser);
// Add out of range global IP.
$this->conf
->set('login_range', $this->outOfRangeCIDR)
->save();
// Load any page, and check if logged out.
$this->dumpHeaders = TRUE;
$this
->drupalGet('user');
$this
->assertFalse($this
->drupalUserIsLoggedIn($this->regularUser), t('User logged out.'));
}