From cd56fb48e1509221d4c6580cc7387abc34cc4b99 Mon Sep 17 00:00:00 2001 From: colemanw Date: Sat, 29 Jul 2023 22:00:21 -0400 Subject: [PATCH] ManagedEntityTest - Simplify reconciliation Followup to #26970 which solved the problem; this removes the workarounds that are no longer needed. --- .../api/v4/Entity/ManagedEntityTest.php | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/tests/phpunit/api/v4/Entity/ManagedEntityTest.php b/tests/phpunit/api/v4/Entity/ManagedEntityTest.php index 9f1247847e..5aad9c475d 100644 --- a/tests/phpunit/api/v4/Entity/ManagedEntityTest.php +++ b/tests/phpunit/api/v4/Entity/ManagedEntityTest.php @@ -530,17 +530,8 @@ class ManagedEntityTest extends TestCase implements HeadlessInterface, Transacti // Refresh managed entities with module active $allModules = [ new CRM_Core_Module('unit.test.fake.ext', TRUE), - // We can't wip out this enabled module as it still have declared - // managed entities & the test will fail if we pretend it doesn't exist - // here but still let it declare entities. - new CRM_Core_Module('legacycustomsearches', TRUE), - new CRM_Core_Module('org.civicrm.search_kit', TRUE), - ]; - $modulesToReconcile = [ - 'unit.test.fake.ext', - 'legacycustomsearches', - 'org.civicrm.search_kit', ]; + $modulesToReconcile = ['unit.test.fake.ext']; (new CRM_Core_ManagedEntities($allModules))->reconcile($modulesToReconcile); $nav = Navigation::get(FALSE) @@ -584,11 +575,6 @@ class ManagedEntityTest extends TestCase implements HeadlessInterface, Transacti // Refresh managed entities with module disabled $allModules = [ new CRM_Core_Module('unit.test.fake.ext', FALSE), - // We can't wip out this enabled module as it still have declared - // managed entities & the test will fail if we pretend it doesn't exist - // here but still let it declare entities. - new CRM_Core_Module('legacycustomsearches', TRUE), - new CRM_Core_Module('org.civicrm.search_kit', TRUE), ]; // If module is disabled it will not run hook_civicrm_managed. $this->_managedEntities = []; @@ -612,11 +598,6 @@ class ManagedEntityTest extends TestCase implements HeadlessInterface, Transacti // Refresh managed entities with module active $allModules = [ new CRM_Core_Module('unit.test.fake.ext', TRUE), - // We can't wip out this enabled module as it still have declared - // managed entities & the test will fail if we pretend it doesn't exist - // here but still let it declare entities. - new CRM_Core_Module('legacycustomsearches', TRUE), - new CRM_Core_Module('org.civicrm.search_kit', TRUE), ]; $this->_managedEntities = $managedEntities; (new CRM_Core_ManagedEntities($allModules))->reconcile($modulesToReconcile); -- 2.25.1