$contribution->find(TRUE);
$contribution->loadRelatedObjects($this->input, $this->ids, TRUE);
$this->assertNotEmpty($contribution->_relatedObjects['membership']);
- $this->assertArrayHasKey($this->_membershipTypeID, $contribution->_relatedObjects['membership']);
- $this->assertTrue(is_a($contribution->_relatedObjects['membership'][$this->_membershipTypeID], 'CRM_Member_BAO_Membership'));
+ $this->assertArrayHasKey($this->_membershipId . '_' . $this->_membershipTypeID, $contribution->_relatedObjects['membership']);
+ $this->assertTrue(is_a($contribution->_relatedObjects['membership'][$this->_membershipId . '_' . $this->_membershipTypeID], 'CRM_Member_BAO_Membership'));
$this->assertTrue(is_a($contribution->_relatedObjects['financialType'], 'CRM_Financial_BAO_FinancialType'));
- $this->assertFalse(empty($contribution->_relatedObjects['contributionRecur']));
- $this->assertFalse(empty($contribution->_relatedObjects['paymentProcessor']));
+ $this->assertNotEmpty($contribution->_relatedObjects['contributionRecur']);
+ $this->assertNotEmpty($contribution->_relatedObjects['paymentProcessor']);
}
/**