From 016569ee53ab52087f623eed69c7fd2a426c06d1 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 21 Apr 2017 10:04:03 +1200 Subject: [PATCH] Further test improvement --- tests/phpunit/CRM/Contribute/Form/ContributionTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php index 6d9710542b..f76c992ae3 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php @@ -967,7 +967,6 @@ Price Field - Price Field 1 1 $ 100.00 $ 100.00 $visaID = CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_FinancialTrxn', 'card_type_id', 'Visa'); $form = new CRM_Contribute_Form_Contribution(); $form->_mode = 'Live'; - $error = FALSE; $form->testSubmit( array( 'total_amount' => 50, @@ -1014,9 +1013,8 @@ Price Field - Price Field 1 1 $ 100.00 $ 100.00 'return' => array('card_type_id', 'pan_truncation'), ) ); - // @todo in test environment FinancialTrxn.getsingle doesn't fetch card_type_id value - //$this->assertEquals(CRM_Utils_Array::value('card_type_id', $financialTrxn), $visaID); - $this->assertEquals(CRM_Utils_Array::value('pan_truncation', $financialTrxn), 1111); + $this->assertEquals($visaID, $financialTrxn['card_type_id']); + $this->assertEquals(1111, $financialTrxn['pan_truncation']); } } -- 2.25.1