You are here

protected function VideoItemSerializationTest::setUp in Video 8

Same name and namespace in other branches
  1. 8.2 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\Kernel

Code

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();
}