diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-06-27 07:25:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-06-27 07:25:11 +0000 |
commit | 32afb3293569649ff9d751f3fe71cd3cbd27989e (patch) | |
tree | 86ccf2860fae953d45e66151b2eab1dbd2dc8660 /modules/user/user.test | |
parent | 66ddfda7a211d0c8dbba8d622fe08918a0fbfe15 (diff) | |
download | brdo-32afb3293569649ff9d751f3fe71cd3cbd27989e.tar.gz brdo-32afb3293569649ff9d751f3fe71cd3cbd27989e.tar.bz2 |
- Patch #266488 by Damien Tournoud: cleanup for user_validate_name().
Diffstat (limited to 'modules/user/user.test')
-rw-r--r-- | modules/user/user.test | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/user/user.test b/modules/user/user.test index 784735fa8..ad05e57ff 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -126,19 +126,19 @@ class UserValidationTestCase extends DrupalWebTestCase { 'foo@-example.com' => array('Valid username', 'assertNull'), // invalid domains are allowed in usernames 'þòøÇߪř€' => array('Valid username', 'assertNull'), 'ᚠᛇᚻ᛫ᛒᛦᚦ' => array('Valid UTF8 username', 'assertNull'), // runes - ' foo' => array('Username that starts with a space', 'assertNotNull'), - 'foo ' => array('Username that ends with a space', 'assertNotNull'), - 'foo bar' => array('Username that contains 2 spaces \' \'', 'assertNotNull'), - '' => array('Empty username', 'assertNotNull'), - 'foo/' => array('Invalid chars in username', 'assertNotNull'), - 'foo' . chr(0) . 'bar' => array('chr(0) in username', 'assertNotNull'), // NULL - 'foo' . chr(13) . 'bar' => array('chr(13) in username', 'assertNotNull'), // CR - str_repeat('x', USERNAME_MAX_LENGTH + 1) => array('Excessively long username', 'assertNotNull'), + ' foo' => array('Invalid username that starts with a space', 'assertNotNull'), + 'foo ' => array('Invalid username that ends with a space', 'assertNotNull'), + 'foo bar' => array('Invalid username that contains 2 spaces \' \'', 'assertNotNull'), + '' => array('Invalid empty username', 'assertNotNull'), + 'foo/' => array('Invalid username containing invalid chars', 'assertNotNull'), + 'foo' . chr(0) . 'bar' => array('Invalid username containing chr(0)', 'assertNotNull'), // NULL + 'foo' . chr(13) . 'bar' => array('Invalid username containing chr(13)', 'assertNotNull'), // CR + str_repeat('x', USERNAME_MAX_LENGTH + 1) => array('Invalid excessively long username', 'assertNotNull'), ); foreach ($test_cases as $name => $test_case) { list($description, $test) = $test_case; $result = user_validate_name($name); - $this->$test($result, $description . ' ('. $name . '). %s'); + $this->$test($result, $description . ' ('. $name . ')'); } } @@ -152,7 +152,7 @@ class UserValidationTestCase extends DrupalWebTestCase { foreach ($test_cases as $name => $test_case) { list($description, $test) = $test_case; $result = user_validate_mail($name); - $this->$test($result, $description . ' (' . $name . '). %s'); + $this->$test($result, $description . ' (' . $name . ')'); } } } |