private static function UserAdminTest::getLinkSelectorForUser in Drupal 9
Same name and namespace in other branches
- 10 core/modules/user/tests/src/Functional/UserAdminTest.php \Drupal\Tests\user\Functional\UserAdminTest::getLinkSelectorForUser()
Gets the xpath selector for a user account.
Parameters
\Drupal\user\Entity\UserInterface $user: The user to get the link for.
Return value
string The xpath selector for the user link.
1 call to UserAdminTest::getLinkSelectorForUser()
- UserAdminTest::testUserAdmin in core/
modules/ user/ tests/ src/ Functional/ UserAdminTest.php - Registers a user and deletes it.
File
- core/
modules/ user/ tests/ src/ Functional/ UserAdminTest.php, line 42
Class
- UserAdminTest
- Tests user administration page functionality.
Namespace
Drupal\Tests\user\FunctionalCode
private static function getLinkSelectorForUser(UserInterface $user) : string {
return '//td[contains(@class, "views-field-name")]/a[text()="' . $user
->getAccountName() . '"]';
}