You are here

public function MakemeetingPollAdminTestCase::_testFillMakemeetingForm in Make Meeting Scheduler 7.2

2 calls to MakemeetingPollAdminTestCase::_testFillMakemeetingForm()
MakemeetingPollAdminTestCase::testAnswerEvent in ./makemeeting.test
Test answering the makemeeting poll
MakemeetingPollAdminTestCase::testTimezone in ./makemeeting.test
Test answering the makemeeting poll

File

./makemeeting.test, line 254
Makemeeting tests

Class

MakemeetingPollAdminTestCase
Test for the creation of a makemeeting poll.

Code

public function _testFillMakemeetingForm() {
  $edit = array();
  $edit['title'] = $this
    ->randomName();
  $edit += array(
    'field_choose_date[und][0][choices][new:0][chdate][month]' => '5',
    'field_choose_date[und][0][choices][new:0][chdate][day]' => '20',
    'field_choose_date[und][0][choices][new:0][chdate][year]' => '2012',
  );
  $this
    ->drupalPostAJAX('node/add/event', $edit, array(
    'op' => t('More choices'),
  ));
  $edit = array(
    'field_choose_date[und][0][choices][20-05-2012][chdate][month]' => '5',
    'field_choose_date[und][0][choices][20-05-2012][chdate][day]' => '20',
    'field_choose_date[und][0][choices][20-05-2012][chdate][year]' => '2012',
    'field_choose_date[und][0][choices][20-05-2012][chsuggestions][sugg:0]' => '19:15',
    'field_choose_date[und][0][choices][new:0][chdate][month]' => '5',
    'field_choose_date[und][0][choices][new:0][chdate][day]' => '21',
    'field_choose_date[und][0][choices][new:0][chdate][year]' => '2012',
  ) + $edit;
  $this
    ->drupalPost(NULL, $edit, t('More choices'));
  $edit = array(
    'field_choose_date[und][0][choices][21-05-2012][chdate][month]' => '5',
    'field_choose_date[und][0][choices][21-05-2012][chdate][day]' => '21',
    'field_choose_date[und][0][choices][21-05-2012][chdate][year]' => '2012',
    'field_choose_date[und][0][choices][new:0][chdate][month]' => '5',
    'field_choose_date[und][0][choices][new:0][chdate][day]' => '22',
    'field_choose_date[und][0][choices][new:0][chdate][year]' => '2012',
  ) + $edit;
  $this
    ->drupalPost(NULL, $edit, t('More suggestions'));
  $edit += array(
    'field_choose_date[und][0][choices][22-05-2012][chdate][month]' => '5',
    'field_choose_date[und][0][choices][22-05-2012][chdate][day]' => '22',
    'field_choose_date[und][0][choices][22-05-2012][chdate][year]' => '2012',
    'field_choose_date[und][0][choices][20-05-2012][chsuggestions][sugg:1]' => '23:15',
  );
  unset($edit['field_choose_date[und][0][choices][new:0][chdate][day]']);
  unset($edit['field_choose_date[und][0][choices][new:0][chdate][month]']);
  unset($edit['field_choose_date[und][0][choices][new:0][chdate][year]']);
  $this
    ->drupalPost(NULL, $edit, t('Copy and paste first row'));
}