You are here

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

File

src/Tests/RoleTest.php, line 46

Class

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

Namespace

Drupal\restrict_by_ip\Tests

Code

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