From 1e9c7097d387e6dcd61f8e4ab5bdc653ab2360f3 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 18 Sep 2023 10:25:34 +1200 Subject: [PATCH] Stop enabling event_cart on new installs 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 | 4 ---- tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sql/civicrm_data/civicrm_extension.sqldata.php b/sql/civicrm_data/civicrm_extension.sqldata.php index c256fca348..90b3c23668 100644 --- a/sql/civicrm_data/civicrm_extension.sqldata.php +++ b/sql/civicrm_data/civicrm_extension.sqldata.php @@ -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', diff --git a/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php b/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php index d931340a39..9d60f4e5f8 100644 --- a/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php +++ b/tests/phpunit/CRM/Financial/Form/PaymentFormsTest.php @@ -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([ -- 2.25.1