function ProfileTestCase::deleteProfileField in Drupal 7
Delete a profile field.
Parameters
$field: The field to be deleted.
3 calls to ProfileTestCase::deleteProfileField()
- ProfileTestDate::testProfileDateField in modules/
profile/ profile.test - Create a date field, give it a value, update and delete the field.
- ProfileTestFields::testProfileFields in modules/
profile/ profile.test - Test each of the field types. List selection and date fields are tested separately because they need some special handling.
- ProfileTestSelect::testProfileSelectionField in modules/
profile/ profile.test - Create a list selection field, give it a value, update and delete the field.
File
- modules/
profile/ profile.test, line 160 - Tests for profile.module.
Class
- ProfileTestCase
- A class for common methods for testing profile fields.
Code
function deleteProfileField($field) {
$this
->drupalPost('admin/config/people/profile/delete/' . $field['fid'], array(), t('Delete'));
$this
->drupalGet('admin/config/people/profile');
$this
->assertNoText($field['title'], format_string('Checking deleted field %title', array(
'%title' => $field['title'],
)));
}