You are here

public function EntityNormalizerValueTest::testRasterizeIncludes in JSON:API 8

@covers ::rasterizeIncludes

File

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

Class

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

Namespace

Drupal\Tests\jsonapi\Unit\Normalizer\Value

Code

public function testRasterizeIncludes() {
  $expected = [
    [
      'data' => [
        'type' => 'node',
        'id' => '199c681d-a9dc-4b6f-a4dc-e3811f24141b',
        'attributes' => [
          'body' => 'dummy_body1',
        ],
      ],
    ],
    [
      'data' => [
        'type' => 'node',
        'id' => '199c681d-a9dc-4b6f-a4dc-e3811f24141b',
        'attributes' => [
          'body' => 'dummy_body2',
        ],
      ],
    ],
    [
      'data' => [
        'type' => 'node',
        'id' => '83771375-a4ba-4d7d-a4d5-6153095bb5c5',
        'attributes' => [
          'body' => 'dummy_body3',
        ],
      ],
    ],
  ];
  $this
    ->assertEquals($expected, $this->object
    ->rasterizeIncludes());
}