protected function GcImportTestBase::setUp in GatherContent 8.4
Same name and namespace in other branches
- 8.5 tests/src/Kernel/GcImportTestBase.php \Drupal\Tests\gathercontent\Kernel\GcImportTestBase::setUp()
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ GcImportTestBase.php, line 29
Class
- GcImportTestBase
- Base class for import kernel tests.
Namespace
Drupal\Tests\gathercontent\KernelCode
protected function setUp() {
parent::setUp();
$this
->installSchema('node', 'node_access');
$this
->installEntitySchema('node');
$this
->installEntitySchema('gathercontent_operation');
$this
->installEntitySchema('file');
$this
->installSchema('file', [
'file_usage',
]);
$this
->installEntitySchema('taxonomy_term');
$this
->installEntitySchema('paragraph');
$this
->installEntitySchema('user');
$this
->installEntitySchema('menu_link_content');
$this
->installConfig([
'gathercontent_test',
]);
MockData::$drupalRoot = $this
->getDrupalRoot();
/** @var \Drupal\taxonomy\Entity\Term[] $terms */
$terms = MockData::createTaxonomyTerms();
foreach ($terms as $term) {
$term
->save();
}
}