diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-05-03 20:01:11 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-05-03 20:01:11 +0000 |
commit | 17df77c3a40200ef456f6ab8c5a3528dd0278741 (patch) | |
tree | 697358531088960d2ce87c1da5d5e3acbca5307e /modules | |
parent | 508eaa90bdfdf5ef09e643aa02430dee86b374af (diff) | |
download | brdo-17df77c3a40200ef456f6ab8c5a3528dd0278741.tar.gz brdo-17df77c3a40200ef456f6ab8c5a3528dd0278741.tar.bz2 |
#295864 follow-up by boombatower: Clarify when to use randomName() vs. randomString().
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 995402c01..ad0e1256e 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -644,7 +644,8 @@ class DrupalWebTestCase { * Generates a random string of ASCII characters of codes 32 to 126. * * The generated string includes alpha-numeric characters and common misc - * characters. + * characters. Use this method when testing general input where the content + * is not restricted. * * @param $length * Length of random string to generate which will be appended to $db_prefix. @@ -665,7 +666,9 @@ class DrupalWebTestCase { * Generates a random string containing letters and numbers. * * The letters may be upper or lower case. This method is better for - * restricted inputs that do not accept certain characters. + * restricted inputs that do not accept certain characters. For example, + * when testing input fields that require machine readable values (ie without + * spaces and non-standard characters) this method is best. * * @param $length * Length of random string to generate which will be appended to $db_prefix. @@ -682,7 +685,7 @@ class DrupalWebTestCase { $str .= chr($values[mt_rand(0, $max)]); } return str_replace('simpletest', 's', $db_prefix) . $str; - } + } /** * Create a user with a given set of permissions. The permissions correspond to the |