From 2e03ce511f2c22f47e9e4e2c8fd4d310b90cf420 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 25 Apr 2015 15:31:49 -0600 Subject: [PATCH] CRM-16357 - Add test wrapper --- CRM/Contribute/Form/Contribution.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 77e5c21ae3..8062df01ae 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -1863,4 +1863,23 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP } } + /** + * Wrapper for unit testing the post process submit function. + * + * (If we expose through api we can get default additions 'for free'). + * + * @param array $params + */ + public function testSubmit($params) { + $defaults = array( + 'soft_credit_contact_id' => array(), + 'receipt_date' => '', + 'receipt_date_time' => '', + 'cancel_date' => '', + 'cancel_date_time' => '', + ); + + $this->submit(array_merge($defaults, $params)); + } + } -- 2.25.1