View source
<?php
namespace Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7;
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
class VocabularyTest extends MigrateSqlSourceTestBase {
protected static $modules = [
'taxonomy',
'migrate_drupal',
];
public function providerSource() {
$tests = [];
$tests[0]['source_data']['taxonomy_vocabulary'] = [
[
'vid' => 1,
'name' => 'Tags',
'description' => 'Tags description.',
'hierarchy' => 0,
'module' => 'taxonomy',
'weight' => 0,
'machine_name' => 'tags',
],
[
'vid' => 2,
'name' => 'Categories',
'description' => 'Categories description.',
'hierarchy' => 1,
'module' => 'taxonomy',
'weight' => 0,
'machine_name' => 'categories',
],
];
$tests[0]['expected_data'] = $tests[0]['source_data']['taxonomy_vocabulary'];
return $tests;
}
}