From a44499b49fbdadb12af456a80677f6767a894412 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 20 Jan 2016 17:58:50 +0530 Subject: [PATCH] --CRM-16259, updated api test for get action --- tests/phpunit/api/v3/PaymentTest.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/api/v3/PaymentTest.php b/tests/phpunit/api/v3/PaymentTest.php index a896791991..f6eadcb9c3 100644 --- a/tests/phpunit/api/v3/PaymentTest.php +++ b/tests/phpunit/api/v3/PaymentTest.php @@ -118,11 +118,14 @@ class api_v3_PaymentTest extends CiviUnitTestCase { $payment = $this->callAPIAndDocument('payment', 'get', $params, __FUNCTION__, __FILE__); $this->assertEquals(1, $payment['count']); - $this->assertEquals($payment['values'][$payment['id']]['total_amount'], 100.00); - $this->assertEquals($payment['values'][$payment['id']]['trxn_id'], 23456); - $this->assertEquals($payment['values'][$payment['id']]['trxn_date'], '2010-01-20 00:00:00'); - $this->assertEquals($payment['values'][$payment['id']]['is_payment'], 1); - $this->assertEquals($payment['values'][$payment['id']]['contribution_id'], $contribution['id']); + $expectedResult = array( + 'total_amount' => 100, + 'trxn_id' => 23456, + 'trxn_date' => '2010-01-20 00:00:00', + 'contribution_id' => $contribution['id'], + 'is_payment' => 1, + ); + $this->checkPaymentResult($payment, $expectedResult); $this->callAPISuccess('Contribution', 'Delete', array( 'id' => $contribution['id'], )); -- 2.25.1