3 namespace Drupal\user\Tests\Views;
6 * Tests the handler of the user: roles argument.
9 * @see \Drupal\user\Plugin\views\argument\RolesRid
11 class RolesRidArgumentTest extends UserTestBase {
14 * Views used by this test.
18 public static $testViews = ['test_user_roles_rid'];
21 * Tests the generated title of a user: roles argument.
23 public function testArgumentTitle() {
24 $role_id = $this->createRole([], 'markup_role_name', '<em>Role name with markup</em>');
25 $user = $this->createUser();
26 $user->addRole($role_id);
29 $this->drupalGet('/user_roles_rid_test/markup_role_name');
30 $this->assertEscaped('<em>Role name with markup</em>');