summaryrefslogtreecommitdiff
path: root/modules/profile/profile.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-04-29 12:08:28 +0000
committerDries Buytaert <dries@buytaert.net>2009-04-29 12:08:28 +0000
commite72114736394ccfc33247b3f9093ed3f5b0f4916 (patch)
treec7dce1a3d55af834ef517815616de08d1e0e6173 /modules/profile/profile.test
parent7bf8e72aaa3f1f287a9666a478eb190941a1758a (diff)
downloadbrdo-e72114736394ccfc33247b3f9093ed3f5b0f4916.tar.gz
brdo-e72114736394ccfc33247b3f9093ed3f5b0f4916.tar.bz2
- Patch #295864 by boombatower: cleaned up the randomName() method by removing unnecessary prefix code, and added a new randomString() method which includes characters like spaces.
Diffstat (limited to 'modules/profile/profile.test')
-rw-r--r--modules/profile/profile.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/profile/profile.test b/modules/profile/profile.test
index 4a211c31d..3d35f153b 100644
--- a/modules/profile/profile.test
+++ b/modules/profile/profile.test
@@ -31,7 +31,7 @@ class ProfileTestCase extends DrupalWebTestCase {
* The fid of the field that was just created.
*/
function createProfileField($type = 'textfield', $category = 'simpletest', $edit = array()) {
- $edit['title'] = $title = $this->randomName(4, $type . '_');
+ $edit['title'] = $title = $this->randomName(8);
$edit['name'] = $form_name = 'profile_' . $title;
$edit['category'] = $category;
$edit['explanation'] = $this->randomName(50);
@@ -224,8 +224,8 @@ class ProfileTestWeights extends ProfileTestCase {
$field1 = $this->createProfileField('textfield', $category, array('weight' => 1));
$field2 = $this->createProfileField('textfield', $category, array('weight' => -1));
- $this->setProfileField($field1, $this->randomName(4, 'first_'));
- $this->setProfileField($field2, $this->randomName(4, 'second_'));
+ $this->setProfileField($field1, $this->randomName(8));
+ $this->setProfileField($field2, $this->randomName(8));
$profile_edit = $this->drupalGet('user/' . $this->normal_user->uid . '/edit/' . $category);
$this->assertTrue(strpos($profile_edit, $field1['title']) > strpos($profile_edit, $field2['title']), t('Profile field weights are respected on the user edit form.'));