public function NodewordsFieldInstanceTest::setUp in Metatag 8
Overrides MigrateSourceTestBase::setUp
File
- tests/
src/ Kernel/ Plugin/ migrate/ source/ d6/ NodewordsFieldInstanceTest.php, line 42
Class
- NodewordsFieldInstanceTest
- Tests Metatag-D6 field instance source plugin.
Namespace
Drupal\Tests\metatag\Kernel\Plugin\migrate\source\d6Code
public function setUp() {
parent::setUp();
$this
->installEntitySchema('node');
$this
->installEntitySchema('taxonomy_term');
$this
->installEntitySchema('user');
$this
->installConfig(static::$modules);
// Create node types.
$node_types = [
'first_content_type' => 'first_content_type',
'second_content_type' => 'second_content_type',
];
foreach ($node_types as $node_type) {
NodeType::create([
'type' => $node_type,
'name' => $node_type,
])
->save();
}
// Setup vocabulary.
Vocabulary::create([
'vid' => 'test_vocabulary',
'name' => 'test_vocabulary',
])
->save();
// Create a term.
Term::create([
'vid' => 'test_vocabulary',
'name' => 'term',
])
->save();
}