diff --git a/tests/phpunit/tests/user.php b/tests/phpunit/tests/user.php index 7c022617e7..23dc291124 100644 --- a/tests/phpunit/tests/user.php +++ b/tests/phpunit/tests/user.php @@ -603,11 +603,21 @@ class Tests_User extends WP_UnitTestCase { * @ticket 24618 */ public function test_validate_username_string() { - $this->assertTrue( validate_username( rand_str() ) ); - $this->assertTrue( validate_username( 'JohnDoe' ) ); + $this->assertTrue( validate_username( 'johndoe' ) ); $this->assertTrue( validate_username( 'test@test.com' ) ); } + /** + * @ticket 24618 + */ + public function test_validate_username_contains_uppercase_letters() { + if ( is_multisite() ) { + $this->assertFalse( validate_username( 'JohnDoe' ) ); + } else { + $this->assertTue( validate_username( 'JohnDoe' ) ); + } + } + /** * @ticket 24618 */