'FinancialTrxn BAOs', 'description' => 'Test all CRM_Core_BAO_ContributionTrxn methods.', 'group' => 'CiviCRM BAO Tests', ); } function setUp() { parent::setUp(); } /** * Check method create() */ function testCreate() { $contactId = $this->individualCreate(); $financialTypeId = 1; $contributionId = $this->contributionCreate($contactId, $financialTypeId); $params = array( 'contribution_id' => $financialTypeId, 'to_financial_account_id' => 1, 'trxn_date' => 20091021184930, 'trxn_type' => 'Debit', 'total_amount' => 10, 'net_amount' => 90.00, 'currency' => 'USD', 'payment_processor' => 'Dummy', 'trxn_id' => 'test_01014000', ); $FinancialTrxn = CRM_Core_BAO_FinancialTrxn::create($params); $result = $this->assertDBNotNull('CRM_Core_BAO_FinancialTrxn', $FinancialTrxn->id, 'total_amount', 'id', 'Database check on updated financial trxn record.' ); $this->assertEquals($result, 10, 'Verify financial trxn total_amount.'); } }