Skip to content
Snippets Groups Projects
Verified Commit cb52e797 authored by Dave Long's avatar Dave Long
Browse files

Issue #3305609 by pooja_sharma, joachim: convert...

Issue #3305609 by pooja_sharma, joachim: convert TermTest::testParentHandlerSettings() into a kernel test

(cherry picked from commit dca3ac8c)
parent ebc8e063
No related branches found
No related tags found
2 merge requests!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #231176 passed
...@@ -89,15 +89,6 @@ protected function setUp(): void { ...@@ -89,15 +89,6 @@ protected function setUp(): void {
->save(); ->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. * Tests terms in a single and multiple hierarchy.
*/ */
......
...@@ -224,4 +224,14 @@ public function testRevisionLogAccess(): void { ...@@ -224,4 +224,14 @@ public function testRevisionLogAccess(): void {
$this->assertFalse($entity->get('revision_log_message')->access('view', $viewer)); $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);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment