You are here

protected function TermTestBase::setUp in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/tests/src/Unit/Migrate/TermTestBase.php \Drupal\Tests\taxonomy\Unit\Migrate\TermTestBase::setUp()

Overrides MigrateSqlSourceTestCase::setUp

1 call to TermTestBase::setUp()
TermSourceWithVocabularyFilterTest::setUp in core/modules/taxonomy/tests/src/Unit/Migrate/TermSourceWithVocabularyFilterTest.php
1 method overrides TermTestBase::setUp()
TermSourceWithVocabularyFilterTest::setUp in core/modules/taxonomy/tests/src/Unit/Migrate/TermSourceWithVocabularyFilterTest.php

File

core/modules/taxonomy/tests/src/Unit/Migrate/TermTestBase.php, line 81
Contains \Drupal\Tests\taxonomy\Unit\Migrate\TermTestBase.

Class

TermTestBase
Base class for taxonomy term source unit tests.

Namespace

Drupal\Tests\taxonomy\Unit\Migrate

Code

protected function setUp() {
  foreach ($this->expectedResults as $k => $row) {
    foreach ($row['parent'] as $parent) {
      $this->databaseContents['term_hierarchy'][] = array(
        'tid' => $row['tid'],
        'parent' => $parent,
      );
    }
    unset($row['parent']);
    $this->databaseContents['term_data'][$k] = $row;
  }
  parent::setUp();
}