public function UserProtectionTest::testNameProtection in User protect 8
Tests if the user's name field has the expected protection.
File
- tests/
src/ Functional/ UserProtectionTest.php, line 33
Class
- UserProtectionTest
- Tests each UserProtection plugin in action.
Namespace
Drupal\Tests\userprotect\FunctionalCode
public function testNameProtection() {
$protected_account = $this
->createProtectedUser([
'user_name',
]);
$this
->drupalGet('user/' . $protected_account
->id() . '/edit');
$this
->assertSession()
->fieldNotExists('name');
}