Skip to content
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

RecurForms test fixes #22784

Merged
merged 1 commit into from
Feb 17, 2022
Merged

RecurForms test fixes #22784

merged 1 commit into from
Feb 17, 2022

Conversation

mattwire
Copy link
Contributor

Overview

Found via #21895

Before

Tests not setting payment_processor_id on contribution recur so defaults to "manual".

After

Tests setting payment_processor_id on contribution recur so uses the one we actually chose.

Technical Details

Comments

@demeritcowboy

@civibot
Copy link

civibot bot commented Feb 17, 2022

(Standard links)

@civibot civibot bot added the master label Feb 17, 2022
'is_send_contribution_notification' => FALSE,
],
]);
$this->callAPISuccess('Payment', 'create', [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't have to be separated. I just find it a bit easier to debug this way.

@@ -58,6 +64,7 @@ public function getContributionRecurID(): int {
'installments' => 12,
'frequency_interval' => 1,
'frequency_unit' => 'month',
'payment_processor_id' => $this->paymentProcessorId,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the important change

@demeritcowboy
Copy link
Contributor

Cool.

Interesting the name of the test class doesn't end in "Test" - has this been running? I don't see it in the list on another PR run I picked at random.

@mattwire
Copy link
Contributor Author

@demeritcowboy It's a helper for CRM_Contribute_Form_CancelSubscriptionTest and UpdateSubscriptionTest. I didn't name the classes :-)

@demeritcowboy
Copy link
Contributor

Ahhh. Ok. I'll probably put up a PR after to add a comment and remove the extends CiviUnitTestCase.

@demeritcowboy
Copy link
Contributor

Oh I see it's actually a base class. So then I'll probably rename it to Base.

@seamuslee001 seamuslee001 merged commit 821bbf9 into civicrm:master Feb 17, 2022
@mattwire mattwire deleted the recurformstests branch February 17, 2022 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants