function LinkCollectionNormalizerTest::setUp

Same name and namespace 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 <a href="/api/drupal/core%21modules%21jsonapi%21src%21Normalizer%21LinkCollectionNormalizer.php/class/LinkCollectionNormalizer/9" title="Normalizes a LinkCollection object." class="local">\Drupal\jsonapi\Normalizer\LinkCollectionNormalizer</a> @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.