From: Seamus Lee Date: Tue, 11 Oct 2016 20:54:55 +0000 (+1100) Subject: Better test fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=257ab382cb93c70223247f03d0b6a353279e96a0;p=civicrm-core.git Better test fix --- 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]); }