You are here

public function RolesRidArgumentTest::testArgumentTitle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Tests/Views/RolesRidArgumentTest.php \Drupal\user\Tests\Views\RolesRidArgumentTest::testArgumentTitle()

Tests the generated title of a user: roles argument.

File

core/modules/user/src/Tests/Views/RolesRidArgumentTest.php, line 28
Contains \Drupal\user\Tests\Views\RolesRidArgumentTest.

Class

RolesRidArgumentTest
Tests the handler of the user: roles argument.

Namespace

Drupal\user\Tests\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>');
}