-
-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests calling AdditionalPayment form to use full flow, add standard ID get functions #28461
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
b49cddd
to
2d455b0
Compare
$title = $this->assignPaymentInfoBlock(); | ||
$this->setTitle($title); | ||
return; | ||
} | ||
if ($this->_component == 'event') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to getContributionID()
@@ -309,9 +312,6 @@ public function postProcess() { | |||
public function submit($submittedValues) { | |||
$this->_params = $submittedValues; | |||
$this->beginPostProcess(); | |||
// _contributorContactID may no longer need to be set - setting it here | |||
// was for use in processBillingAddress | |||
$this->_contributorContactID = $this->_contactID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused, from previously shared code
@@ -425,27 +425,26 @@ public function processCreditCard() { | |||
} | |||
|
|||
$this->set('params', $this->_params); | |||
|
|||
// set source if not set | |||
if (empty($this->_params['source'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused, from previously shared code
); | ||
$this->_params['source'] = ts('Submit Credit Card Payment by: %1', [1 => $userSortName]); | ||
} | ||
return [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return payment processor values, this is used in a follow up
…ributionID() function
2d455b0
to
6876b7b
Compare
Opps I included one of my follow on changes - removed CRM_Contribute_Form_AdditionalPaymentTest::testAddPaymentUsingCreditCardForPartiallyPaidContribution |
Overview
FIx tests caling AdditionalPayment form to use full flow, add getContributionID(), getPaymentProcessorID() functions
Before
tests call an artifical
testSubmit()
functionAfter
tests use the FormTrait, standardised externally supported
getContributionID()
added & testedTechnical Details
Also removes setting the source - this is from previously shared code where it set up the value for contribution source - but this form only interacts with the Payment api, not the contribution
Comments