From 4ff25fbbd29089724b9e9ab2c9207ba9ed312cfb Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Wed, 2 Sep 2015 16:08:06 +1200 Subject: [PATCH] CRM-17120 enhance test to check honor contact output --- .../CRM/Contribute/BAO/ContributionTest.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php b/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php index dac08b402a..4fde993147 100644 --- a/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/BAO/ContributionTest.php @@ -249,8 +249,21 @@ class CRM_Contribute_BAO_ContributionTest extends CiviUnitTestCase { $this->assertDBCompareValue('CRM_Contribute_DAO_ContributionSoft', $id, 'contact_id', 'contribution_id', $honoreeContactId, 'Check DB for honor contact of the contribution' ); - //get honory information + //get honorary information $getHonorContact = CRM_Contribute_BAO_Contribution::getHonorContacts($honoreeContactId); + $this->assertEquals(array( + $id => array( + 'honor_type' => 'In Honor of', + 'honorId' => $id, + 'display_name' => 'John Doe', + 'type' => 'Event Fee', + 'type_id' => '4', + 'amount' => '$ 66.00', + 'source' => NULL, + 'receive_date' => '2015-09-02 00:00:00', + 'contribution_status' => 'Completed', + ), + ), $getHonorContact); $this->assertDBCompareValue('CRM_Contact_DAO_Contact', $honoreeContactId, 'first_name', 'id', $firstName, 'Database check for created honor contact record.' -- 2.25.1