public function ContentEntityMetatagTest::setUp in Translation Management Tool 8
Overrides ContentEntityTestBase::setUp
File
- sources/
content/ tests/ src/ Kernel/ ContentEntityMetatagTest.php, line 26
Class
- ContentEntityMetatagTest
- Content entity Source unit tests.
Namespace
Drupal\Tests\tmgmt_content\KernelCode
public function setUp() : void {
parent::setUp();
$field_storage = FieldStorageConfig::create(array(
'field_name' => 'field_meta_tags',
'entity_type' => $this->entityTypeId,
'type' => 'metatag',
'cardinality' => 1,
'translatable' => TRUE,
));
$field_storage
->save();
FieldConfig::create(array(
'entity_type' => $this->entityTypeId,
'field_storage' => $field_storage,
'bundle' => $this->entityTypeId,
'label' => 'Meta tags',
))
->save();
$this
->installConfig([
'metatag',
]);
}