1 field.test FieldCrudTestCase::testUpdateNonExistentField()

File

core/modules/field/tests/field.test, line 2417
Tests for field.module.

Class

FieldCrudTestCase

Code

function testUpdateNonExistentField() {
  $test_field = array('field_name' => 'does_not_exist', 'type' => 'number_decimal');
  try {
    field_update_field($test_field);
    $this->fail(t('Cannot update a field that does not exist.'));
  }
  catch (FieldException $e) {
    $this->pass(t('Cannot update a field that does not exist.'));
  }
}