Stop ignoring tests when apiv4 function does not exist
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 18 Dec 2023 12:50:08 +0000 (01:50 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 18 Dec 2023 18:28:26 +0000 (07:28 +1300)
Civi/Test/Api3TestTrait.php
tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php

index d68b04de11753d02a8871c87976db1b73fbf4e0c..5feb3689e75ec9bb5d347388520fccf078d79c41 100644 (file)
@@ -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.");
index 21ea558e29884683417898eca4c9d0ffa588445f..143e3dd62c1ae08bf232af03cbd30bfaec1d0bd9 100644 (file)
@@ -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([