function UserNameValidatorTest::testValidUsernames

Same name in other branches
  1. 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\Kernel

Code

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.