You are here

protected function GcImportTestBase::setUp in GatherContent 8.5

Same name and namespace in other branches
  1. 8.4 tests/src/Kernel/GcImportTestBase.php \Drupal\Tests\gathercontent\Kernel\GcImportTestBase::setUp()

Overrides KernelTestBase::setUp

File

tests/src/Kernel/GcImportTestBase.php, line 28

Class

GcImportTestBase
Base class for import kernel tests.

Namespace

Drupal\Tests\gathercontent\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installSchema('node', 'node_access');
  $this
    ->installEntitySchema('node');
  $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();
  }
}