From a16c88380b4c1ca9eccdf2a9a52b4b6368825f55 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 20 Dec 2024 11:09:11 +1300 Subject: [PATCH] MNT Fix unit test --- tests/php/ORM/HierarchyTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/php/ORM/HierarchyTest.php b/tests/php/ORM/HierarchyTest.php index 01a1f7f4e5a..202c3ced250 100644 --- a/tests/php/ORM/HierarchyTest.php +++ b/tests/php/ORM/HierarchyTest.php @@ -690,6 +690,12 @@ public function testDefaultParent(string $class, ?string $defaultParentConfig, ? */ public function testGetTreeTitleExtension() { + // Ensure no other extensions are applied which would change the expected result + foreach (Group::get_extensions() as $extension) { + if ($extension !== 'SilverStripe\ORM\Hierarchy\Hierarchy') { + Group::remove_extension($extension); + } + } Group::add_extension(TestTreeTitleExtension::class); $group = new Group(); $group->Title = 'My group';