You are here

public function UiRoleExpireTest::testRoleExpireEditRoleFields in Role Expire 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/UiRoleExpireTest.php \Drupal\Tests\role_expire\Functional\UiRoleExpireTest::testRoleExpireEditRoleFields()

Tests that users can assign a default expiration date/time on roles.

File

tests/src/Functional/UiRoleExpireTest.php, line 75

Class

UiRoleExpireTest
Tests that the Role expire interface is available.

Namespace

Drupal\Tests\role_expire\Functional

Code

public function testRoleExpireEditRoleFields() {
  $account = $this
    ->drupalCreateUser([
    'administer permissions',
    'administer role expire',
  ]);
  $this
    ->drupalLogin($account);
  $this
    ->drupalGet('admin/people/roles/manage/anonymous');
  $this
    ->assertSession()
    ->statusCodeEquals(200);

  // Test that the default duration field is available.
  $this
    ->assertSession()
    ->pageTextContains('Default duration for the role');
}