From 57090c33da0e007e6569106c92ce5b3cd3745bf7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 30 Sep 2009 12:26:36 +0000 Subject: - Patch #367013 by bjaspan, yched: clean ups for field_update_field(). --- modules/field/field.test | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'modules/field/field.test') 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 @@ -1873,30 +1873,6 @@ class FieldCrudTestCase extends FieldTestCase { $this->assertEqual($entity->decimal53[FIELD_LANGUAGE_NONE][2]['value'], '1.236', t('4 decimal places are rounded to 3')); } - /** - * 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. */ -- cgit v1.2.3