protected function MetatagSerializationTest::setUp in Metatag 8
Set the default field storage backend for fields created during tests.
Overrides FieldKernelTestBase::setUp
File
- tests/
src/ Kernel/ MetatagSerializationTest.php, line 41
Class
- MetatagSerializationTest
- Tests metatag field serialization.
Namespace
Drupal\Tests\metatag\KernelCode
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('user');
$this->serializer = \Drupal::service('serializer');
// Create a generic metatag field.
FieldStorageConfig::create([
'entity_type' => 'entity_test',
'field_name' => 'field_test',
'type' => 'metatag',
])
->save();
FieldConfig::create([
'entity_type' => 'entity_test',
'field_name' => 'field_test',
'bundle' => 'entity_test',
])
->save();
}