$this->ids['Contact']['participant'] = $params['contact_id'] = $this->individualCreate();
}
if (empty($params['event_id'])) {
- $event = $this->eventCreate();
+ $event = $this->eventCreate(['end_date' => 20081023, 'registration_end_date' => 20081015]);
$params['event_id'] = $event['id'];
}
$defaults = [
'event_type_id' => 1,
'is_public' => 1,
'start_date' => 20081021,
- 'end_date' => 20081023,
+ 'end_date' => '+ 1 month',
'is_online_registration' => 1,
'registration_start_date' => 20080601,
- 'registration_end_date' => 20081015,
+ 'registration_end_date' => '+ 1 month',
'max_participants' => 100,
'event_full_text' => 'Sorry! We are already full',
'is_monetary' => 0,
$form->controller = new CRM_Event_Cart_Controller_Checkout();
break;
+ case 'CRM_Event_Form_Registration_Confirm':
+ $form->controller = new CRM_Event_Controller_Registration();
+ break;
+
+ case 'CRM_Contact_Import_Form_DataSource':
+ case 'CRM_Contact_Import_Form_MapField':
+ $form->controller = new CRM_Contact_Import_Controller();
+ $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
+ // The submitted values should be set on one or the other of the forms in the flow.
+ // For test simplicity we set on all rather than figuring out which ones go where....
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['DataSource'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['MapField'] = $formValues;
+ return $form;
+
case strpos($class, '_Form_') !== FALSE:
$form->controller = new CRM_Core_Controller_Simple($class, $pageName);
break;