public function MakemeetingPollAdminTestCase::_testCreateField in Make Meeting Scheduler 7.2
Helper function to create an event content type and attach a makemeeting field
5 calls to MakemeetingPollAdminTestCase::_testCreateField()
- MakemeetingPollAdminTestCase::testAnswerEvent in ./
makemeeting.test - Test answering the makemeeting poll
- MakemeetingPollAdminTestCase::testCreateEvent in ./
makemeeting.test - Test the creation of event content with multiple makmeeting values
- MakemeetingPollAdminTestCase::testEmptyField in ./
makemeeting.test - Test the creation of event content with multiple makmeeting values
- MakemeetingPollAdminTestCase::testFieldUI in ./
makemeeting.test - Test the creation of a content type and attach a field
- MakemeetingPollAdminTestCase::testTimezone in ./
makemeeting.test - Test answering the makemeeting poll
File
- ./
makemeeting.test, line 230 - Makemeeting tests
Class
- MakemeetingPollAdminTestCase
- Test for the creation of a makemeeting poll.
Code
public function _testCreateField() {
// Login as admin
$this
->drupalLogin($this->privileged_user);
// Create the content type
$edit = array();
$edit['name'] = 'Event';
$edit['type'] = 'event';
$this
->drupalPost('admin/structure/types/add', $edit, t('Save content type'));
$this
->assertText('The content type Event has been added.', 'Content type added.');
// Creates the field.
$edit = array();
$edit['fields[_add_new_field][label]'] = 'Choose date';
$edit['fields[_add_new_field][field_name]'] = 'choose_date';
$edit['fields[_add_new_field][weight]'] = '0';
$edit['fields[_add_new_field][type]'] = 'makemeeting';
$edit['fields[_add_new_field][widget_type]'] = 'makemeeting_choices';
$this
->drupalPost('admin/structure/types/manage/event/fields', $edit, t('Save'));
$edit = array();
$this
->drupalPost(NULL, $edit, t('Save field settings'));
}