You are here

public function OffsetPageNormalizerTest::testDenormalize in JSON:API 8

@covers ::denormalize @dataProvider denormalizeProvider

File

tests/src/Kernel/Normalizer/OffsetPageNormalizerTest.php, line 47

Class

OffsetPageNormalizerTest
@coversDefaultClass \Drupal\jsonapi\Normalizer\OffsetPageNormalizer @group jsonapi @group jsonapi_normalizers @group legacy

Namespace

Drupal\Tests\jsonapi\Kernel\Normalizer

Code

public function testDenormalize($original, $expected) {
  $actual = $this->normalizer
    ->denormalize($original, OffsetPage::class);
  $this
    ->assertEquals($expected['offset'], $actual
    ->getOffset());
  $this
    ->assertEquals($expected['limit'], $actual
    ->getSize());
}