You are here

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

File

./restrict_by_ip.test, line 189

Class

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

Code

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