You are here

public function RestrictIpAccessTest::testEmailAddressDisplays in Restrict IP 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/RestrictIpAccessTest.php \Drupal\Tests\restrict_ip\Functional\RestrictIpAccessTest::testEmailAddressDisplays()
  2. 3.x tests/src/Functional/RestrictIpAccessTest.php \Drupal\Tests\restrict_ip\Functional\RestrictIpAccessTest::testEmailAddressDisplays()

File

tests/src/Functional/RestrictIpAccessTest.php, line 50

Class

RestrictIpAccessTest
@group restrict_ip

Namespace

Drupal\Tests\restrict_ip\Functional

Code

public function testEmailAddressDisplays() {
  $adminUser = $this
    ->drupalCreateUser([
    'administer restricted ip addresses',
    'access administration pages',
    'administer modules',
  ]);
  $this
    ->drupalLogin($adminUser);
  $this
    ->drupalGet('admin/config/people/restrict_ip');
  $this
    ->assertStatusCodeEquals(200);
  $this
    ->checkCheckbox('#edit-enable');
  $this
    ->fillTextValue('edit-mail-address', 'dave@example.com');
  $this
    ->click('#edit-submit');
  $this
    ->assertSession()
    ->pageTextContains('dave[at]example.com');
}