Stop flushing caches on enable civiCampaign
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 14 Oct 2021 06:09:51 +0000 (19:09 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 14 Oct 2021 06:09:51 +0000 (19:09 +1300)
We should be able to get the 'right' cache clearing via the core function.

tests/phpunit/CiviTest/CiviUnitTestCase.php

index e717eec4f3bdb69e42d564fc8e43bd7cd346a660..dc3cbf18486f75d9fc86a7f8d523cd105577729b 100644 (file)
@@ -1778,18 +1778,9 @@ class CiviUnitTestCase extends PHPUnit\Framework\TestCase {
 
   /**
    * Enable CiviCampaign Component.
-   *
-   * @param bool $reloadConfig
-   *    Force relaod config or not
    */
-  public function enableCiviCampaign($reloadConfig = TRUE) {
+  public function enableCiviCampaign(): void {
     CRM_Core_BAO_ConfigSetting::enableComponent('CiviCampaign');
-    if ($reloadConfig) {
-      // force reload of config object
-      $config = CRM_Core_Config::singleton(TRUE, TRUE);
-    }
-    //flush cache by calling with reset
-    $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name', TRUE);
   }
 
   /**