* @throws \CRM_Core_Exception
*/
public function testCreateGetFieldsWithCustom(): void {
- $ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
- $idsContact = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, 'ContactTest.php');
+ $ids = $this->entityCustomGroupWithSingleFieldCreate('ContributionCustomFields', __FILE__);
+ $idsContact = $this->entityCustomGroupWithSingleFieldCreate('ContactCustomFields', 'ContactTest.php');
$result = $this->callAPISuccess('Contribution', 'getfields', []);
$this->assertArrayHasKey('custom_' . $ids['custom_field_id'], $result['values']);
$this->assertArrayNotHasKey('custom_' . $idsContact['custom_field_id'], $result['values']);
/**
* Function tests that financial records are updated when Payment Instrument is changed.
*/
- public function testCreateUpdateContributionPaymentInstrument() {
+ public function testCreateUpdateContributionPaymentInstrument(): void {
$instrumentId = $this->_addPaymentInstrument();
$contribParams = [
'contact_id' => $this->_individualId,
'id' => $contribution['id'],
'payment_instrument_id' => $instrumentId,
]);
- $contribution = $this->callAPISuccess('contribution', 'create', $newParams);
+ $contribution = $this->callAPISuccess('Contribution', 'create', $newParams);
$this->assertAPISuccess($contribution);
$this->checkFinancialTrxnPaymentInstrumentChange($contribution['id'], 4, $instrumentId);
// cleanup - delete created payment instrument
- $this->_deletedAddedPaymentInstrument();
+ $this->deletedAddedPaymentInstrument();
}
/**
$this->checkFinancialTrxnPaymentInstrumentChange($contribution['id'], 4, $instrumentId, -100);
// cleanup - delete created payment instrument
- $this->_deletedAddedPaymentInstrument();
+ $this->deletedAddedPaymentInstrument();
}
/**
/**
* CRM-14151 - Test completing a transaction via the API.
*/
- public function testCompleteTransactionWithReceiptDateSet() {
+ public function testCompleteTransactionWithReceiptDateSet(): void {
$this->swapMessageTemplateForTestTemplate();
$mut = new CiviMailUtils($this, TRUE);
$this->createLoggedInUser();
return $optionValue['values'][$optionValue['id']]['value'];
}
- public function _deletedAddedPaymentInstrument() {
+ public function deletedAddedPaymentInstrument() {
$result = $this->callAPISuccess('OptionValue', 'get', [
'option_group_id' => 'payment_instrument',
'name' => 'Test Card',