diff --git a/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php index fb0dd1b..194db8e 100644 --- a/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +++ b/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php @@ -8,6 +8,7 @@ use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\file\Entity\File; use Drupal\jsonapi\JsonApiResource\ErrorCollection; +use Drupal\jsonapi\JsonApiResource\NullEntityCollection; use Drupal\jsonapi\LinkManager\LinkManager; use Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel; use Drupal\node\Entity\Node; @@ -396,7 +397,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase { ->container ->get('jsonapi.serializer_do_not_use_removal_imminent') ->serialize( - new JsonApiDocumentTopLevel(new ErrorCollection([new BadRequestHttpException('Lorem')]), NULL, []), + new JsonApiDocumentTopLevel(new ErrorCollection([new BadRequestHttpException('Lorem')]), new NullEntityCollection(), []), 'api_json', [] ); @@ -416,7 +417,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase { */ public function testNormalizeConfig() { list($request, $resource_type) = $this->generateProphecies('node_type', 'node_type', 'id'); - $document_wrapper = new JsonApiDocumentTopLevel($this->nodeType, NULL, []); + $document_wrapper = new JsonApiDocumentTopLevel($this->nodeType, new NullEntityCollection(), []); $jsonapi_doc_object = $this ->getNormalizer() @@ -684,7 +685,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase { 'resource_type' => $resource_type, 'account' => NULL, ]; - $jsonapi_doc_object = $this->getNormalizer()->normalize(new JsonApiDocumentTopLevel($this->node, NULL, []), 'api_json', $context); + $jsonapi_doc_object = $this->getNormalizer()->normalize(new JsonApiDocumentTopLevel($this->node, new NullEntityCollection(), []), 'api_json', $context); $this->assertArraySubset($expected_metadata->getCacheTags(), $jsonapi_doc_object->getCacheTags()); $this->assertArraySubset($expected_metadata->getCacheContexts(), $jsonapi_doc_object->getCacheContexts()); $this->assertSame($expected_metadata->getCacheMaxAge(), $jsonapi_doc_object->getCacheMaxAge());