You are here

protected function ResourceObjectNormalizerCacherTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php \Drupal\Tests\jsonapi\Kernel\EventSubscriber\ResourceObjectNormalizerCacherTest::setUp()
  2. 10 core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php \Drupal\Tests\jsonapi\Kernel\EventSubscriber\ResourceObjectNormalizerCacherTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php, line 56

Class

ResourceObjectNormalizerCacherTest
@coversDefaultClass \Drupal\jsonapi\EventSubscriber\ResourceObjectNormalizationCacher @group jsonapi

Namespace

Drupal\Tests\jsonapi\Kernel\EventSubscriber

Code

protected function setUp() : void {
  parent::setUp();

  // Add the entity schemas.
  $this
    ->installEntitySchema('user');

  // Add the additional table schemas.
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this->resourceTypeRepository = $this->container
    ->get('jsonapi.resource_type.repository');
  $this->serializer = $this->container
    ->get('jsonapi.serializer');
  $this->cacher = $this->container
    ->get('jsonapi.normalization_cacher');
}