You are here

public function RoleTest::testRoleAppliedMatchIP in Restrict Login or Role Access by IP Address 8.4

File

src/Tests/RoleTest.php, line 39

Class

RoleTest
Tests roles are restricted to certain IP address range(s).

Namespace

Drupal\restrict_by_ip\Tests

Code

public function testRoleAppliedMatchIP() {
  $this->conf
    ->set('role.' . $this->role
    ->id(), $this->currentIPCIDR)
    ->save();
  $this
    ->drupalLogin($this->regularUser);
  $this
    ->drupalGet('user/' . $this->regularUser
    ->id() . '/edit');
  $this
    ->assertText($this->role
    ->label());
}