protected function TermParentsTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/taxonomy/tests/src/Functional/TermParentsTest.php \Drupal\Tests\taxonomy\Functional\TermParentsTest::setUp()
- 9 core/modules/taxonomy/tests/src/Functional/TermParentsTest.php \Drupal\Tests\taxonomy\Functional\TermParentsTest::setUp()
File
- core/
modules/ taxonomy/ tests/ src/ Functional/ TermParentsTest.php, line 50
Class
- TermParentsTest
- Tests managing taxonomy parents through the user interface.
Namespace
Drupal\Tests\taxonomy\FunctionalCode
protected function setUp() : void {
parent::setUp();
/** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
$entity_type_manager = $this->container
->get('entity_type.manager');
$this->termStorage = $entity_type_manager
->getStorage('taxonomy_term');
$this->state = $this->container
->get('state');
Vocabulary::create([
'vid' => $this->vocabularyId,
])
->save();
$this
->drupalLogin($this
->drupalCreateUser([
'administer taxonomy',
]));
}