$activityId = civicrm_api3('activity', 'create', $value);
// @todo this would be done by the api call above if the parames were passed through.
+ // @todo extract submit functions &
+ // extend CRM_Event_Form_Task_BatchTest::testSubmit with a data provider to test
+ // handling of custom data, specifically checkbox fields.
if (!empty($value['custom']) &&
is_array($value['custom'])
) {
);
}
//check for custom data
+ // @todo extract submit functions &
+ // extend CRM_Event_Form_Task_BatchTest::testSubmit with a data provider to test
+ // handling of custom data, specifically checkbox fields.
$value['custom'] = CRM_Core_BAO_CustomField::postProcess($params['field'][$key],
$key,
'Case',
public function postProcess() {
$params = $this->exportValues();
+ // @todo extract submit functions &
+ // extend CRM_Event_Form_Task_BatchTest::testSubmit with a data provider to test
+ // handling of custom data, specifically checkbox fields.
$ufGroupId = $this->get('ufGroupId');
$notify = NULL;
$inValidSubtypeCnt = 0;
*/
public function postProcess() {
$params = $this->exportValues();
+ // @todo extract submit functions &
+ // extend CRM_Event_Form_Task_BatchTest::testSubmit with a data provider to test
+ // handling of custom data, specifically checkbox fields.
if (isset($params['field'])) {
foreach ($params['field'] as $contributionID => $value) {
// Unset the original custom field now that it has been formatting to the 'custom'
// array as it may not be in the right format for the api as is (notably for
// multiple checkbox values).
+ // @todo extract submit functions on other Batch update classes &
+ // extend CRM_Event_Form_Task_BatchTest::testSubmit with a data provider to test them.
if (substr($fieldName, 0, 7) === 'custom_') {
unset($value[$fieldName]);
}
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2018
- * $Id$
- *
*/
/**
*/
public function postProcess() {
$params = $this->exportValues();
+ // @todo extract submit functions &
+ // extend CRM_Event_Form_Task_BatchTest::testSubmit with a data provider to test
+ // handling of custom data, specifically checkbox fields.
$dates = array(
'join_date',
'membership_start_date',
*/
class CRM_Event_Form_Task_BatchTest extends CiviUnitTestCase {
+ /**
+ * Test the the submit function on the event participant submit function.
+ *
+ * @todo extract submit functions on other Batch update classes, use dataprovider to test on all.
+ */
public function testSubmit() {
$group = $this->CustomGroupCreate(['extends' => 'Participant', 'title' => 'Participant']);
$field = $this->customFieldCreate(['custom_group_id' => $group['id'], 'html_type' => 'CheckBox', 'option_values' => ['two' => 'A couple', 'three' => 'A few', 'four' => 'Too Many']]);