function LinkCollectionNormalizerTest::setUp

Same name in other branches
  1. 10 core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php \Drupal\Tests\jsonapi\Kernel\Normalizer\LinkCollectionNormalizerTest::setUp()
  2. 11.x 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');
}

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