-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
[NFC] {test} code cleanup in test class #20389
Conversation
(Standard links)
|
@@ -236,7 +239,6 @@ public function testCreateCheckContribution() { | |||
$params['amount_level'] = 'Unreasonable'; | |||
$params['cancel_reason'] = 'You lose sucker'; | |||
$params['creditnote_id'] = 'sudo rm -rf'; | |||
$params['tax_amount'] = '1'; |
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.
This is removed because the test operates with tax disabled so it is not valid to have a tax_amount for this contribution
public function testCreateContributionSourceInvalidContContact() { | ||
|
||
$params = [ | ||
'contribution_contact_id' => 999, |
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.
We have adequate cover for using an invalid contact id in syntax conformance - in general these failure tests have been rationalised from the early days
public function testDeleteParamsNotArrayContribution() { | ||
$this->expectException(TypeError::class); | ||
$params = 'contribution_id= 1'; | ||
$contribution = $this->callAPIFailure('contribution', 'delete', $params); |
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.
This is adequately covered in syntax conformance & with array typing
|
@seamuslee001 I think that is already fixed |
Overview
[NFC] {test} code cleanup in test class
Before
Loads of bad practice
After
IDE mental state much improved
Technical Details
Comments