From: eileen Date: Thu, 20 Apr 2017 22:04:03 +0000 (+1200) Subject: Further test improvement X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=016569ee53ab52087f623eed69c7fd2a426c06d1;p=civicrm-core.git Further test improvement --- 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']); } }