Stop enabling event_cart on new installs
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 17 Sep 2023 22:25:34 +0000 (10:25 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 18 Sep 2023 01:11:57 +0000 (13:11 +1200)
Although we have not fully extracted this, it seems that disabling does not
cause any errors, so it makes sense to stop enabling. Once we have been running
like this on our dev & demo sites for a while we can disable it
for any existing sites that do not have
event cart enabled

sql/civicrm_data/civicrm_extension.sqldata.php
tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php

index c256fca3482827a8e4248a2074cb8416c42797e3..90b3c236686ff85521495995c683a4437b8bada5 100644 (file)
@@ -20,10 +20,6 @@ return CRM_Core_CodeGen_SqlData::create('civicrm_extension', 'INSERT IGNORE INTO
       'full_name' => 'greenwich',
       'name' => 'Theme: Greenwich',
     ],
-    [
-      'full_name' => 'eventcart',
-      'name' => 'Event cart',
-    ],
     [
       'full_name' => 'financialacls',
       'name' => 'Financial ACLs',
index d931340a39d68a1920949f58ee5ca08f4bf6a0aa..9d60f4e5f8ce210892fdaee0d5b5ec3672bdc120 100644 (file)
@@ -33,12 +33,19 @@ class CRM_Financial_Form_PaymentFormsTest extends CiviUnitTestCase {
 
   use CRM_Core_Payment_AuthorizeNetTrait;
 
+  public function tearDown(): void {
+    $this->callAPISuccess('Extension', 'disable', ['keys' => ['eventcart']]);
+    $this->callAPISuccess('Extension', 'uninstall', ['keys' => ['eventcart']]);
+    parent::tearDown();
+  }
+
   /**
    * Generic test on event payment forms to make sure they submit without error with payment processing.
    *
    * @throws \CRM_Core_Exception
    */
   public function testEventPaymentForms(): void {
+    $this->callAPISuccess('Extension', 'install', ['keys' => ['eventcart']]);
     $this->createAuthorizeNetProcessor();
     $processors = [$this->ids['PaymentProcessor']['anet']];
     $eventID = $this->eventCreatePaid([