function ProfileTestCase::deleteProfileField

7.x profile.test ProfileTestCase::deleteProfileField($field)

Delete a profile field.

Parameters

$field: The field to be deleted.

3 calls to ProfileTestCase::deleteProfileField()
ProfileTestDate::testProfileDateField in drupal-7.x/modules/profile/profile.test
Create a date field, give it a value, update and delete the field.
ProfileTestFields::testProfileFields in drupal-7.x/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 drupal-7.x/modules/profile/profile.test
Create a list selection field, give it a value, update and delete the field.

File

drupal-7.x/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'])));
}