From 257ab382cb93c70223247f03d0b6a353279e96a0 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 12 Oct 2016 07:54:55 +1100 Subject: [PATCH] Better test fix --- tests/phpunit/api/v3/ContributionTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index 00f29808cb..692748e417 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -2083,15 +2083,14 @@ class api_v3_ContributionTest extends CiviUnitTestCase { 'line_total' => '100.00', 'unit_price' => '100.00', 'financial_type_id' => 2, + 'contribution_type_id' => 2, ) ); - $lineItem2 = $this->callAPISuccess('line_item', 'get', array_merge($lineItemParams, array( 'entity_id' => $originalContribution['id'] + 1, ))); unset($expectedLineItem['id'], $expectedLineItem['entity_id']); unset($lineItem2['values'][0]['id'], $lineItem2['values'][0]['entity_id']); - $expectedLineItem['contribution_type_id'] = $lineItem2['values'][0]['contribution_type_id']; $this->assertEquals($expectedLineItem, $lineItem2['values'][0]); } @@ -2134,6 +2133,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase { 'line_total' => '100.00', 'unit_price' => '100.00', 'financial_type_id' => 2, + 'contribution_type_id' => 2, ) ); @@ -2142,7 +2142,6 @@ class api_v3_ContributionTest extends CiviUnitTestCase { ))); unset($expectedLineItem['id'], $expectedLineItem['entity_id']); unset($lineItem2['values'][0]['id'], $lineItem2['values'][0]['entity_id']); - $expectedLineItem['contribution_type_id'] = $lineItem2['values'][0]['contribution_type_id']; $this->assertEquals($expectedLineItem, $lineItem2['values'][0]); } -- 2.25.1