function EntityReferenceFieldItemNormalizerTest::testDenormalizeWithId

@covers ::denormalize

File

core/modules/serialization/tests/src/Unit/Normalizer/EntityReferenceFieldItemNormalizerTest.php, line 420

Class

EntityReferenceFieldItemNormalizerTest
@coversDefaultClass \Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer[[api-linebreak]] @group serialization

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

public function testDenormalizeWithId() : void {
  $data = [
    'target_id' => 'test',
  ];
  $this->fieldItem
    ->setValue($data)
    ->shouldBeCalled();
  $this->assertDenormalize($data);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.