function UserNameValidatorTest::testValidUsernames
Same name in other branches
- 10 core/modules/user/tests/src/Kernel/UserNameValidatorTest.php \Drupal\Tests\user\Kernel\UserNameValidatorTest::testValidUsernames()
Tests valid user name validation.
@dataProvider validUsernameProvider
File
-
core/
modules/ user/ tests/ src/ Kernel/ UserNameValidatorTest.php, line 41
Class
- UserNameValidatorTest
- Verify that user validity checks behave as designed.
Namespace
Drupal\Tests\user\KernelCode
public function testValidUsernames($name) : void {
$violations = $this->userValidator
->validateName($name);
$this->assertEmpty($violations);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.