function RolesRidArgumentTest::testArgumentTitle

Same name and namespace in other branches
  1. 11.x core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php \Drupal\Tests\user\Functional\Views\RolesRidArgumentTest::testArgumentTitle()
  2. 10 core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php \Drupal\Tests\user\Functional\Views\RolesRidArgumentTest::testArgumentTitle()
  3. 9 core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php \Drupal\Tests\user\Functional\Views\RolesRidArgumentTest::testArgumentTitle()
  4. main core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php \Drupal\Tests\user\Functional\Views\RolesRidArgumentTest::testArgumentTitle()

Tests the generated title of a user: roles argument.

File

core/modules/user/tests/src/Functional/Views/RolesRidArgumentTest.php, line 28

Class

RolesRidArgumentTest
Tests the handler of the user: roles argument.

Namespace

Drupal\Tests\user\Functional\Views

Code

public function testArgumentTitle() {
  $role_id = $this->createRole([], 'markup_role_name', '<em>Role name with markup</em>');
  $user = $this->createUser();
  $user->addRole($role_id);
  $user->save();
  $this->drupalGet('/user_roles_rid_test/markup_role_name');
  $this->assertEscaped('<em>Role name with markup</em>');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.