FOS\UserBundle\Tests\Validation\UserValidationTest::testGoodUsernameValid PHP Method

testGoodUsernameValid() public method

    public function testGoodUsernameValid()
    {
        $user = $this->getService('fos_user.user_manager')->createUser();
        $user->setUsername(uniqid());
        $violations = $this->getService('validator')->validate($user, 'Registration');
        $this->assertFalse($this->hasViolationForPropertyPath($violations, 'username'));
    }