From 840e3907460a81f01182af0965e3dc675593d1bd Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 22 Aug 2016 20:22:55 +1200 Subject: [PATCH] Fix contribution page test to create & check line-items --- tests/phpunit/api/v3/ContributionPageTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/api/v3/ContributionPageTest.php b/tests/phpunit/api/v3/ContributionPageTest.php index b40d3b8a51..f789eb0b89 100644 --- a/tests/phpunit/api/v3/ContributionPageTest.php +++ b/tests/phpunit/api/v3/ContributionPageTest.php @@ -305,7 +305,8 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase { $this->callAPIAndDocument('contribution_page', 'submit', $submitParams, __FUNCTION__, __FILE__, 'submit contribution page', NULL); $contribution = $this->callAPISuccess('contribution', 'getsingle', array('contribution_page_id' => $this->_ids['contribution_page'])); - $this->callAPISuccess('membership_payment', 'getsingle', array('contribution_id' => $contribution['id'])); + $membershipPayment = $this->callAPISuccess('membership_payment', 'getsingle', array('contribution_id' => $contribution['id'])); + $this->callAPISuccessGetSingle('LineItem', array('contribution_id' => $contribution['id'], 'entity_id' => $membershipPayment['id'])); } /** @@ -837,7 +838,7 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase { 'membership_type_id' => $membershipTypeID, 'price_field_id' => $priceField['id'], )); - $this->_ids['price_field_value'][] = $priceFieldValue['id']; + $this->_ids['price_field_value'][] = $priceFieldValue; } } -- 2.25.1