protected function TaxonomyEntityIndexKernelTestBase::setUp in Taxonomy Entity Index 8
Overrides KernelTestBase::setUp
1 call to TaxonomyEntityIndexKernelTestBase::setUp()
- TaxonomyEntityIndexEntityTest::setUp in tests/
src/ Kernel/ TaxonomyEntityIndexEntityTest.php
1 method overrides TaxonomyEntityIndexKernelTestBase::setUp()
- TaxonomyEntityIndexEntityTest::setUp in tests/
src/ Kernel/ TaxonomyEntityIndexEntityTest.php
File
- tests/
src/ Kernel/ TaxonomyEntityIndexKernelTestBase.php, line 43
Class
- TaxonomyEntityIndexKernelTestBase
- Defines a base class for taxonomy entity index kernel tests.
Namespace
Drupal\Tests\taxonomy_entity_index\KernelCode
protected function setUp() {
parent::setUp();
foreach (array_merge($this->entityTypes, [
'taxonomy_term',
'user',
]) as $entity_type_id) {
$this
->installEntitySchema($entity_type_id);
}
$this
->installConfig('taxonomy_entity_index');
$this
->installSchema('system', 'sequences');
$this
->installSchema('taxonomy_entity_index', 'taxonomy_entity_index');
$this
->config('taxonomy_entity_index.settings')
->set('types', $this->entityTypes)
->save();
foreach ($this->entityTypes as $entity_type_id) {
foreach ($this
->createBundles($entity_type_id) as $bundle) {
$this
->setupTermField($entity_type_id, $bundle, 'termz');
}
}
}