$this->assertEquals(2, $financialTrxn->N, 'Mismatch count for is payment flag.');
}
- /**
- * addPayments() method (add and edit modes of participant).
- *
- * Add Payments is part of an old, flawed, code flow.
- */
- public function testAddPayments() {
- $contribution = $this->addParticipantWithContribution();
- // Delete existing financial_trxns. This is because we are testing a code flow we
- // want to deprecate & remove & the test relies on bad data asa starting point.
- // End goal is the Order.create->Payment.create flow.
- CRM_Core_DAO::executeQuery('DELETE FROM civicrm_entity_financial_trxn WHERE entity_table = "civicrm_financial_item"');
- CRM_Contribute_BAO_Contribution::addPayments([$contribution]);
- $this->checkItemValues($contribution);
- }
-
/**
* checks db values for financial item
*/