1.20.x field.test | FieldCrudTestCase::testUpdateNonExistentField() |
File
- modules/
field/ tests/ field.test, line 2417 - Tests for field.module.
Class
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.'));
}
}