function ResourceObjectNormalizerCacherTest::setUp

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php \Drupal\Tests\jsonapi\Kernel\EventSubscriber\ResourceObjectNormalizerCacherTest::setUp()
  2. 8.9.x core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php \Drupal\Tests\jsonapi\Kernel\EventSubscriber\ResourceObjectNormalizerCacherTest::setUp()
  3. 11.x 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 65

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.