diff --git a/core/modules/taxonomy/tests/src/Functional/TermTest.php b/core/modules/taxonomy/tests/src/Functional/TermTest.php index 70aea5a79ca115464d5b75de814d70c729253cd8..a483a034b9356340b17ea7a9a35d654ad8e0d891 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermTest.php @@ -89,15 +89,6 @@ protected function setUp(): void { ->save(); } - /** - * The "parent" field must restrict references to the same vocabulary. - */ - public function testParentHandlerSettings(): void { - $vocabulary_fields = \Drupal::service('entity_field.manager')->getFieldDefinitions('taxonomy_term', $this->vocabulary->id()); - $parent_target_bundles = $vocabulary_fields['parent']->getSetting('handler_settings')['target_bundles']; - $this->assertSame([$this->vocabulary->id() => $this->vocabulary->id()], $parent_target_bundles); - } - /** * Tests terms in a single and multiple hierarchy. */ diff --git a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php index 09b014d5776bb8608136a48e5995f80d0824da5c..72ecd2cf61270a350e2575d6b7e2747ff3d1c04f 100644 --- a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php @@ -224,4 +224,14 @@ public function testRevisionLogAccess(): void { $this->assertFalse($entity->get('revision_log_message')->access('view', $viewer)); } + /** + * The "parent" field must restrict references to the same vocabulary. + */ + public function testParentHandlerSettings(): void { + $vocabulary = $this->createVocabulary(); + $vocabulary_fields = \Drupal::service('entity_field.manager')->getFieldDefinitions('taxonomy_term', $vocabulary->id()); + $parent_target_bundles = $vocabulary_fields['parent']->getSetting('handler_settings')['target_bundles']; + $this->assertSame([$vocabulary->id() => $vocabulary->id()], $parent_target_bundles); + } + }