class TaxonomyTermDeriverTest
Same name and namespace in other branches
- 11.x core/modules/taxonomy/tests/src/Kernel/Migrate/TaxonomyTermDeriverTest.php \Drupal\Tests\taxonomy\Kernel\Migrate\TaxonomyTermDeriverTest
Tests d7 taxonomy term deriver.
@group migrate_drupal_7
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase extends \Drupal\migrate\MigrateMessageInterface implements \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase implements \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\taxonomy\Kernel\Migrate\TaxonomyTermDeriverTest implements \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase implements \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase extends \Drupal\migrate\MigrateMessageInterface implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of TaxonomyTermDeriverTest
File
-
core/
modules/ taxonomy/ tests/ src/ Kernel/ Migrate/ TaxonomyTermDeriverTest.php, line 14
Namespace
Drupal\Tests\taxonomy\Kernel\MigrateView source
class TaxonomyTermDeriverTest extends MigrateDrupal7TestBase {
protected static $modules = [
'taxonomy',
'text',
];
/**
* Tests fields exist in process pipeline for term migrations.
*/
public function testBuilder() {
// Test a field on the vocabfixed term.
$process = $this->getMigration('d7_taxonomy_term:vocabfixed')
->getProcess();
$this->assertSame('field_training', $process['field_training'][0]['source']);
// Test a field on the vocablocalized term.
$process = $this->getMigration('d7_taxonomy_term:vocablocalized')
->getProcess();
$this->assertSame('field_sector', $process['field_sector'][0]['source']);
// Test a field on the vocabtranslate term.
$process = $this->getMigration('d7_taxonomy_term:vocabtranslate')
->getProcess();
$this->assertSame('field_chancellor', $process['field_chancellor'][0]['source']);
// Test a field on the test_vocabulary term.
$process = $this->getMigration('d7_taxonomy_term:test_vocabulary')
->getProcess();
$this->assertSame('field_integer', $process['field_integer'][0]['source']);
$this->assertSame('field_term_reference', $process['field_term_reference'][0]['source']);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.