You are here

public function RestrictByIpRoleTests::testRoleDeniedDifferIP in Restrict Login or Role Access by IP Address 7.3

File

./restrict_by_ip.test, line 196

Class

RestrictByIpRoleTests
Test that role restrictions work. Assumes that local testing environment has IP address of 127.0.0.1.

Code

public function testRoleDeniedDifferIP() {
  variable_set('restrict_by_ip_role_' . _restrict_by_ip_hash_role_name($this->role['name']), '10.0.0.0/8');
  $this
    ->drupalLogin($this->regularUser);
  $this
    ->drupalGet('user/' . $this->regularUser->uid . '/edit');
  $this
    ->assertNoText($this->role['name']);
}