From d3fb9f2d910b260c8033603ebfa91fd4b5c399d0 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 19 Dec 2023 01:50:08 +1300 Subject: [PATCH] Stop ignoring tests when apiv4 function does not exist --- Civi/Test/Api3TestTrait.php | 2 -- tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Civi/Test/Api3TestTrait.php b/Civi/Test/Api3TestTrait.php index d68b04de11..5feb3689e7 100644 --- a/Civi/Test/Api3TestTrait.php +++ b/Civi/Test/Api3TestTrait.php @@ -515,8 +515,6 @@ trait Api3TestTrait { $actionInfo = \civicrm_api4($v4Entity, 'getActions', ['checkPermissions' => FALSE, 'where' => [['name', '=', $v4Action]]]); } catch (NotImplementedException $e) { - // For now we'll mark the test incomplete if a v4 entity doesn't exit yet - $this->markTestIncomplete($e->getMessage()); } if (!isset($actionInfo[0])) { throw new \Exception("Api4 $v4Entity $v4Action does not exist."); diff --git a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php index 21ea558e29..143e3dd62c 100644 --- a/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php @@ -670,7 +670,7 @@ class CRM_Contribute_Form_Contribution_ConfirmTest extends CiviUnitTestCase { $this->getContributionPageID()); $contribution = $this->callAPISuccessGetSingle('Contribution', ['contribution_page_id' => $this->getContributionPageID()]); - $this->callAPISuccessGetSingle('MembershipPayment', ['contribution_id' => $contribution['id'], 'version' => 3]); + $this->callAPISuccessGetSingle('MembershipPayment', ['version' => 3, 'contribution_id' => $contribution['id']]); //Assert only one mail is being sent. $this->assertMailSentCount(1); $this->assertMailSentContainingStrings([ -- 2.25.1