diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-09-30 12:26:36 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-09-30 12:26:36 +0000 |
commit | 57090c33da0e007e6569106c92ce5b3cd3745bf7 (patch) | |
tree | 27a5d8d340c64fad5029cae852e8628c6e778c76 /modules/field/field.test | |
parent | 4d99a96690ba8ffbf20398d683ed3c040c167722 (diff) | |
download | brdo-57090c33da0e007e6569106c92ce5b3cd3745bf7.tar.gz brdo-57090c33da0e007e6569106c92ce5b3cd3745bf7.tar.bz2 |
- Patch #367013 by bjaspan, yched: clean ups for field_update_field().
Diffstat (limited to 'modules/field/field.test')
-rw-r--r-- | modules/field/field.test | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/modules/field/field.test b/modules/field/field.test index 2c1b74bf4..7c1d2da6b 100644 --- a/modules/field/field.test +++ b/modules/field/field.test @@ -1874,30 +1874,6 @@ class FieldCrudTestCase extends FieldTestCase { } /** - * Test updating a field with data. - */ - function testUpdateFieldSchemaWithData() { - // Create a decimal 5.2 field and add some data. - $field = array('field_name' => 'decimal52', 'type' => 'number_decimal', 'settings' => array('precision' => 5, 'scale' => 2)); - $field = field_create_field($field); - $instance = array('field_name' => 'decimal52', 'bundle' => FIELD_TEST_BUNDLE); - $instance = field_create_instance($instance); - $entity = field_test_create_stub_entity(0, 0, $instance['bundle']); - $entity->decimal52[FIELD_LANGUAGE_NONE][0]['value'] = '1.235'; - field_attach_insert('test_entity', $entity); - - // Attempt to update the field in a way that would work without data. - $field['settings']['scale'] = 3; - try { - field_update_field($field); - $this->fail(t('Cannot update field schema with data.')); - } - catch (FieldException $e) { - $this->pass(t('Cannot update field schema with data.')); - } - } - - /** * Test field type modules forbidding an update. */ function testUpdateFieldForbid() { |