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';