dev/core#4225 Add test for new regression
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 3 May 2023 00:31:33 +0000 (12:31 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 3 May 2023 00:32:52 +0000 (12:32 +1200)
tests/phpunit/api/v3/RelationshipTest.php

index d28887429bd45736ca984fa2dbf19d1765287a63..cce47316b1a979d5c3d1aa90f127449aa2962c95 100644 (file)
@@ -85,6 +85,8 @@ class api_v3_RelationshipTest extends CiviUnitTestCase {
     $this->quickCleanup(['civicrm_relationship', 'civicrm_membership'], TRUE);
     RelationshipType::delete(FALSE)->addWhere('id', '>', ($this->relationshipTypeID - 1))->execute();
     parent::tearDown();
+    CRM_Core_BAO_ConfigSetting::enableComponent('CiviMember');
+
   }
 
   /**
@@ -103,6 +105,7 @@ class api_v3_RelationshipTest extends CiviUnitTestCase {
    * Test Current Employer is correctly set.
    */
   public function testCurrentEmployerRelationship(): void {
+    CRM_Core_BAO_ConfigSetting::disableComponent('CiviMember');
     $employerRelationshipID = $this->callAPISuccessGetValue('RelationshipType', [
       'return' => 'id',
       'name_b_a' => 'Employer Of',