You are here

protected function JsonapiHypermediaLinkCollectionNormalizerTest::getNormalization in JSON:API Hypermedia 8

Gets a normalized array using the SUT.

1 call to JsonapiHypermediaLinkCollectionNormalizerTest::getNormalization()
JsonapiHypermediaLinkCollectionNormalizerTest::testNormalize in tests/src/Kernel/Normalizer/JsonapiHypermediaLinkCollectionNormalizerTest.php
Tests link collection normalization.

File

tests/src/Kernel/Normalizer/JsonapiHypermediaLinkCollectionNormalizerTest.php, line 194

Class

JsonapiHypermediaLinkCollectionNormalizerTest
Test the link collection normalizer that replaces the core normalizer.

Namespace

Drupal\Tests\jsonapi_hypermedia\Kernel\Normalizer

Code

protected function getNormalization(LinkCollection $link_collection) {
  $normalization = $this->normalizer
    ->normalize($link_collection, 'api_json', []);
  $this
    ->assertInstanceOf(CacheableNormalization::class, $normalization);
  return $normalization
    ->getNormalization();
}