Skip to content

Commit

Permalink
Minor test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Sep 22, 2020
1 parent a7d8600 commit 12ffd86
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/phpunit/CRM/Member/Form/MembershipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1574,10 +1574,10 @@ public function testMembershipViewContributionOwnerDifferent() {
$contactId2 = $this->individualCreate();

// create new membership type
$membershipTypeAnnualFixed = $this->callAPISuccess('membership_type', 'create', [
$membershipTypeAnnualFixed = $this->callAPISuccess('MembershipType', 'create', [
'domain_id' => 1,
'name' => 'AnnualFixed 2',
'member_of_contact_id' => 23,
'member_of_contact_id' => $this->organizationCreate(),
'duration_unit' => 'year',
'minimum_fee' => 50,
'duration_interval' => 1,
Expand All @@ -1600,6 +1600,7 @@ public function testMembershipViewContributionOwnerDifferent() {
'total_amount' => 25,
'financial_type_id' => 2,
'contact_id' => $contactId2,
'receive_date' => '2020-08-08',
];
$contribution1 = CRM_Member_BAO_Membership::recordMembershipContribution($contriParams);

Expand All @@ -1609,6 +1610,7 @@ public function testMembershipViewContributionOwnerDifferent() {
'total_amount' => 25,
'financial_type_id' => 2,
'contact_id' => $contactId2,
'receive_date' => '2020-07-08',
];
$contribution2 = CRM_Member_BAO_Membership::recordMembershipContribution($contriParams);

Expand All @@ -1621,7 +1623,7 @@ public function testMembershipViewContributionOwnerDifferent() {
$membershipViewForm->preProcess();

// get contribution rows related to membership payments
$templateVar = $membershipViewForm->getTemplate()->get_template_vars('rows');
$templateVar = $membershipViewForm::getTemplate()->get_template_vars('rows');

$this->assertEquals($templateVar[0]['contribution_id'], $contribution1->id);
$this->assertEquals($templateVar[0]['contact_id'], $contactId2);
Expand Down

0 comments on commit 12ffd86

Please sign in to comment.