summaryrefslogtreecommitdiff
path: root/modules/field
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/field
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/field')
-rw-r--r--modules/field/field.test6
-rw-r--r--modules/field/modules/text/text.test4
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/field/field.test b/modules/field/field.test
index 7030b9543..9df1bb997 100644
--- a/modules/field/field.test
+++ b/modules/field/field.test
@@ -724,9 +724,9 @@ class FieldFormTestCase extends DrupalWebTestCase {
$web_user = $this->drupalCreateUser(array('access field_test content', 'administer field_test content'));
$this->drupalLogin($web_user);
- $this->field_single = array('field_name' => drupal_strtolower($this->randomName(). '_field_name'), 'type' => 'test_field');
- $this->field_multiple = array('field_name' => drupal_strtolower($this->randomName(). '_field_name'), 'type' => 'test_field', 'cardinality' => 4);
- $this->field_unlimited = array('field_name' => drupal_strtolower($this->randomName(). '_field_name'), 'type' => 'test_field', 'cardinality' => FIELD_CARDINALITY_UNLIMITED);
+ $this->field_single = array('field_name' => drupal_strtolower($this->randomName()), 'type' => 'test_field');
+ $this->field_multiple = array('field_name' => drupal_strtolower($this->randomName()), 'type' => 'test_field', 'cardinality' => 4);
+ $this->field_unlimited = array('field_name' => drupal_strtolower($this->randomName()), 'type' => 'test_field', 'cardinality' => FIELD_CARDINALITY_UNLIMITED);
$this->instance = array(
'bundle' => 'test_bundle',
diff --git a/modules/field/modules/text/text.test b/modules/field/modules/text/text.test
index 8f7459370..cb240b6c9 100644
--- a/modules/field/modules/text/text.test
+++ b/modules/field/modules/text/text.test
@@ -76,7 +76,7 @@ class TextFieldTestCase extends DrupalWebTestCase {
function _testTextfieldWidgets($field_type, $widget_type) {
// Setup a field and instance
$entity_type = 'test_entity';
- $this->field_name = drupal_strtolower($this->randomName() . '_field_name');
+ $this->field_name = drupal_strtolower($this->randomName());
$this->field = array('field_name' => $this->field_name, 'type' => $field_type);
field_create_field($this->field);
$this->instance = array(
@@ -128,7 +128,7 @@ class TextFieldTestCase extends DrupalWebTestCase {
function _testTextfieldWidgetsFormatted($field_type, $widget_type) {
// Setup a field and instance
$entity_type = 'test_entity';
- $this->field_name = drupal_strtolower($this->randomName() . '_field_name');
+ $this->field_name = drupal_strtolower($this->randomName());
$this->field = array('field_name' => $this->field_name, 'type' => $field_type);
field_create_field($this->field);
$this->instance = array(