You are here

public function MigrateTaxonomyTermTest::testTaxonomyTerms in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTaxonomyTermTest.php \Drupal\taxonomy\Tests\Migrate\d6\MigrateTaxonomyTermTest::testTaxonomyTerms()
  2. 8 core/modules/taxonomy/src/Tests/Migrate/d7/MigrateTaxonomyTermTest.php \Drupal\taxonomy\Tests\Migrate\d7\MigrateTaxonomyTermTest::testTaxonomyTerms()
Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/Tests/Migrate/d7/MigrateTaxonomyTermTest.php \Drupal\taxonomy\Tests\Migrate\d7\MigrateTaxonomyTermTest::testTaxonomyTerms()

Tests the Drupal 7 taxonomy term to Drupal 8 migration.

File

core/modules/taxonomy/src/Tests/Migrate/d7/MigrateTaxonomyTermTest.php, line 62
Contains \Drupal\taxonomy\Tests\Migrate\d7\MigrateTaxonomyTermTest.

Class

MigrateTaxonomyTermTest
Upgrade taxonomy terms.

Namespace

Drupal\taxonomy\Tests\Migrate\d7

Code

public function testTaxonomyTerms() {
  $this
    ->assertEntity(1, 'General discussion', 'forums', '', 2);
  $this
    ->assertEntity(2, 'Term1', 'test_vocabulary', 'The first term.');
  $this
    ->assertEntity(3, 'Term2', 'test_vocabulary', 'The second term.');
  $this
    ->assertEntity(4, 'Term3', 'test_vocabulary', 'The third term.', 0, [
    3,
  ]);
  $this
    ->assertEntity(5, 'Custom Forum', 'forums', 'Where the cool kids are.', 3);
  $this
    ->assertEntity(6, 'Games', 'forums', '', 4);
  $this
    ->assertEntity(7, 'Minecraft', 'forums', '', 1, [
    6,
  ]);
  $this
    ->assertEntity(8, 'Half Life 3', 'forums', '', 0, [
    6,
  ]);
}