You are here

public function EntityNormalizerValueTest::testCacheability in JSON:API 8

@covers ::__construct

File

tests/src/Unit/Normalizer/Value/EntityNormalizerValueTest.php, line 133

Class

EntityNormalizerValueTest
@coversDefaultClass \Drupal\jsonapi\Normalizer\Value\EntityNormalizerValue @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Normalizer\Value

Code

public function testCacheability() {
  $this
    ->assertSame([
    'ccbar',
    'ccbaz',
    'ccfoo',
  ], $this->object
    ->getCacheContexts());
  $this
    ->assertSame([
    'ctbar',
    'ctbaz',
    'ctfoo',
  ], $this->object
    ->getCacheTags());
  $this
    ->assertSame(15, $this->object
    ->getCacheMaxAge());
}