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