protected function RequiredByRoleDateFieldWebTestCase::deleteDateField in Required by role 7
Helper method to delete a date field.
2 calls to RequiredByRoleDateFieldWebTestCase::deleteDateField()
- RequiredByRoleDateFieldWebTestCase::DotestIsNonRequiredRole in tests/
required_by_role_test/ RequiredByRoleDateFieldWebTestCase.test - Test for non-required role.
- RequiredByRoleDateFieldWebTestCase::DotestRequiredRole in tests/
required_by_role_test/ RequiredByRoleDateFieldWebTestCase.test - Test for required roles.
File
- tests/
required_by_role_test/ RequiredByRoleDateFieldWebTestCase.test, line 280 - Tests for the Email field.
Class
- RequiredByRoleDateFieldWebTestCase
- @file Tests for the Email field.
Code
protected function deleteDateField($label, $bundle = 'article', $bundle_name = 'Article') {
$this
->drupalGet("admin/structure/types/manage/{$bundle}/fields");
$this
->clickLink('delete');
$this
->drupalPost(NULL, NULL, t('Delete'));
$this
->assertText("The field {$label} has been deleted from the {$bundle_name} content type.", 'Removed date field.');
}