You are here

protected function LinkCollectionNormalizerTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php \Drupal\Tests\jsonapi\Kernel\Normalizer\LinkCollectionNormalizerTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php, line 61

Class

LinkCollectionNormalizerTest
@coversDefaultClass \Drupal\jsonapi\Normalizer\LinkCollectionNormalizer @group jsonapi

Namespace

Drupal\Tests\jsonapi\Kernel\Normalizer

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',
  ]);

  // Set the user IDs to something higher than 1 so these users cannot be
  // mistaken for the site admin.
  $this->testUsers[] = $this
    ->createUser([], NULL, FALSE, [
    'uid' => 2,
  ]);
  $this->testUsers[] = $this
    ->createUser([], NULL, FALSE, [
    'uid' => 3,
  ]);
  $this->serializer = $this->container
    ->get('jsonapi.serializer');
}