X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fapi%2Fv3%2FContributionTest.php;h=599f2ee4bb69a472e6ad3cd9cb999fd0f623f6c7;hb=8b3f4fafbdfeb97824046778737a60fa202d626d;hp=720e48f52ec6a8852d2b492f665f5a74d2385a3d;hpb=2892e5439f4baf7c47e8be77950c0547bc083ce6;p=civicrm-core.git diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index 720e48f52e..599f2ee4bb 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -506,8 +506,8 @@ class api_v3_ContributionTest extends CiviUnitTestCase { * @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']); @@ -1390,7 +1390,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase { /** * 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, @@ -1406,12 +1406,12 @@ class api_v3_ContributionTest extends CiviUnitTestCase { '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(); } /** @@ -1438,7 +1438,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase { $this->checkFinancialTrxnPaymentInstrumentChange($contribution['id'], 4, $instrumentId, -100); // cleanup - delete created payment instrument - $this->_deletedAddedPaymentInstrument(); + $this->deletedAddedPaymentInstrument(); } /** @@ -3064,7 +3064,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase { /** * 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(); @@ -4196,7 +4196,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase { 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',