diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-04-20 02:46:25 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-04-20 02:46:25 +0000 |
commit | 4ffebc570cf2586b0e80de02c87745c0df7f688d (patch) | |
tree | 4670a1d40b86308f72f548a922d7acbe1cd164a5 /modules/field/field.test | |
parent | d30a41e79147b29c22027e64fdf53e34d24bafe0 (diff) | |
download | brdo-4ffebc570cf2586b0e80de02c87745c0df7f688d.tar.gz brdo-4ffebc570cf2586b0e80de02c87745c0df7f688d.tar.bz2 |
#368639 by puradata: Remove drupalCreateField/Instance in favour of standard API functions.
Diffstat (limited to 'modules/field/field.test')
-rw-r--r-- | modules/field/field.test | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/field/field.test b/modules/field/field.test index f54ad5842..af9eb4b72 100644 --- a/modules/field/field.test +++ b/modules/field/field.test @@ -1,8 +1,6 @@ <?php // $Id$ -// TODO : use drupalCreateField() / drupalCreateFieldInstance() all over ? - class FieldAttachTestCase extends DrupalWebTestCase { public static function getInfo() { return array( @@ -1013,8 +1011,10 @@ class FieldTestCase extends DrupalWebTestCase { // TODO: Also test deletion of the data stored in the field ? // Create two fields (so we can test that only one is deleted). - $this->field = $this->drupalCreateField('test_field', 'test_field_name'); - $this->another_field = $this->drupalCreateField('test_field', 'another_test_field_name'); + $this->field = array('field_name' => 'test_field_name', 'type' => 'test_field'); + field_create_field($this->field); + $this->another_field = array('field_name' => 'another_test_field_name', 'type' => 'test_field'); + field_create_field($this->another_field); // Create instances for each. $this->instance_definition = array( @@ -1073,8 +1073,11 @@ class FieldInstanceTestCase extends DrupalWebTestCase { function setUp() { parent::setUp('field_sql_storage', 'field', 'field_test'); - - $this->field = $this->drupalCreateField('test_field'); + $this->field = array( + 'field_name' => drupal_strtolower($this->randomName()), + 'type' => 'test_field', + ); + field_create_field($this->field); $this->instance_definition = array( 'field_name' => $this->field['field_name'], 'bundle' => FIELD_TEST_BUNDLE, |