Mercurial > hg > isophonics-drupal-site
annotate core/modules/user/src/Tests/Views/RolesRidArgumentTest.php @ 9:1fc0ff908d1f
Add another data file
author | Chris Cannam |
---|---|
date | Mon, 05 Feb 2018 12:34:32 +0000 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\user\Tests\Views; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * Tests the handler of the user: roles argument. |
Chris@0 | 7 * |
Chris@0 | 8 * @group user |
Chris@0 | 9 * @see \Drupal\user\Plugin\views\argument\RolesRid |
Chris@0 | 10 */ |
Chris@0 | 11 class RolesRidArgumentTest extends UserTestBase { |
Chris@0 | 12 |
Chris@0 | 13 /** |
Chris@0 | 14 * Views used by this test. |
Chris@0 | 15 * |
Chris@0 | 16 * @var array |
Chris@0 | 17 */ |
Chris@0 | 18 public static $testViews = ['test_user_roles_rid']; |
Chris@0 | 19 |
Chris@0 | 20 /** |
Chris@0 | 21 * Tests the generated title of a user: roles argument. |
Chris@0 | 22 */ |
Chris@0 | 23 public function testArgumentTitle() { |
Chris@0 | 24 $role_id = $this->createRole([], 'markup_role_name', '<em>Role name with markup</em>'); |
Chris@0 | 25 $user = $this->createUser(); |
Chris@0 | 26 $user->addRole($role_id); |
Chris@0 | 27 $user->save(); |
Chris@0 | 28 |
Chris@0 | 29 $this->drupalGet('/user_roles_rid_test/markup_role_name'); |
Chris@0 | 30 $this->assertEscaped('<em>Role name with markup</em>'); |
Chris@0 | 31 } |
Chris@0 | 32 |
Chris@0 | 33 } |