From 32afb3293569649ff9d751f3fe71cd3cbd27989e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 27 Jun 2008 07:25:11 +0000 Subject: - Patch #266488 by Damien Tournoud: cleanup for user_validate_name(). --- modules/user/user.test | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'modules/user/user.test') 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 . ')'); } } } -- cgit v1.2.3