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 00f29808cbcc..692748e41730 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -2083,15 +2083,14 @@ public function testRepeatTransactionPassedInFinancialType() { '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 @@ public function testRepeatTransactionUpdatedFinancialType() { 'line_total' => '100.00', 'unit_price' => '100.00', 'financial_type_id' => 2, + 'contribution_type_id' => 2, ) ); @@ -2142,7 +2142,6 @@ public function testRepeatTransactionUpdatedFinancialType() { ))); 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]); }