From: Eileen McNaughton Date: Thu, 21 Dec 2023 21:13:20 +0000 (+1300) Subject: Remove deprecated test-only function X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d5b87555f2ce5b2742dedd2c0ee1e5ed971e1483;p=civicrm-core.git Remove deprecated test-only function --- diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index 75f4701601..e6e0cb1ddf 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -1192,41 +1192,6 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { } } - /** - * Submit in test mode. - * - * Do not use this - we have figured out how to emulate form in tests now. - * - * See ConfirmTest. - * - * @deprecated - * - * @param $params - */ - public static function testSubmit($params) { - CRM_Core_Error::deprecatedFunctionWarning('use the Civi\Test\FormTrait'); - $form = new CRM_Event_Form_Registration_Confirm(); - // This way the mocked up controller ignores the session stuff. - $_SERVER['REQUEST_METHOD'] = 'GET'; - $_REQUEST['id'] = $form->_eventId = $params['id']; - $form->controller = new CRM_Event_Controller_Registration(); - $form->_params = $params['params']; - // This happens in buildQuickForm so emulate here. - $form->_amount = $form->_totalAmount = $params['totalAmount'] ?? 0; - $form->set('params', $params['params']); - $form->_values['custom_pre_id'] = $params['custom_pre_id'] ?? NULL; - $form->_values['custom_post_id'] = $params['custom_post_id'] ?? NULL; - $form->_values['event'] = $params['event'] ?? NULL; - $eventParams = ['id' => $params['id']]; - CRM_Event_BAO_Event::retrieve($eventParams, $form->_values['event']); - $form->set('registerByID', $params['registerByID']); - if (!empty($params['paymentProcessorObj'])) { - $form->_paymentProcessor = $params['paymentProcessorObj']; - } - $form->postProcess(); - return $form; - } - /** * Process the payment, redirecting back to the page on error. *