From cea43646c68fb1a9737b532bc77c4d684ef2a058 Mon Sep 17 00:00:00 2001 From: larssandergreen Date: Sat, 29 Jul 2023 18:20:47 -0600 Subject: [PATCH] Limit Managed Entity test reconciliation to the entities in the test --- tests/phpunit/api/v4/Entity/ManagedEntityTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/api/v4/Entity/ManagedEntityTest.php b/tests/phpunit/api/v4/Entity/ManagedEntityTest.php index 73e23aa9d8..9f1247847e 100644 --- a/tests/phpunit/api/v4/Entity/ManagedEntityTest.php +++ b/tests/phpunit/api/v4/Entity/ManagedEntityTest.php @@ -536,7 +536,12 @@ class ManagedEntityTest extends TestCase implements HeadlessInterface, Transacti new CRM_Core_Module('legacycustomsearches', TRUE), new CRM_Core_Module('org.civicrm.search_kit', TRUE), ]; - (new CRM_Core_ManagedEntities($allModules))->reconcile(); + $modulesToReconcile = [ + 'unit.test.fake.ext', + 'legacycustomsearches', + 'org.civicrm.search_kit', + ]; + (new CRM_Core_ManagedEntities($allModules))->reconcile($modulesToReconcile); $nav = Navigation::get(FALSE) ->addWhere('name', '=', 'Test_Parent') @@ -587,7 +592,7 @@ class ManagedEntityTest extends TestCase implements HeadlessInterface, Transacti ]; // If module is disabled it will not run hook_civicrm_managed. $this->_managedEntities = []; - (new CRM_Core_ManagedEntities($allModules))->reconcile(); + (new CRM_Core_ManagedEntities($allModules))->reconcile($modulesToReconcile); // Children's weight should have been unaffected, but they should be disabled $children = Navigation::get(FALSE) @@ -614,7 +619,7 @@ class ManagedEntityTest extends TestCase implements HeadlessInterface, Transacti new CRM_Core_Module('org.civicrm.search_kit', TRUE), ]; $this->_managedEntities = $managedEntities; - (new CRM_Core_ManagedEntities($allModules))->reconcile(); + (new CRM_Core_ManagedEntities($allModules))->reconcile($modulesToReconcile); // Children's weight should have been unaffected, but they should be enabled $children = Navigation::get(FALSE) -- 2.25.1