ResourceIdentifierNormalizer example

->willReturnArgument(2);
    $resource_type_repository = $this->prophesize(ResourceTypeRepository::class);
    $resource_type_repository->get('fake_entity_type', 'dummy_bundle')->willReturn($this->resourceType);

    $entity = $this->prophesize(EntityInterface::class);
    $entity->uuid()->willReturn('4e6cb61d-4f04-437f-99fe-42c002393658');
    $entity->id()->willReturn(42);
    $entity_repository = $this->prophesize(EntityRepositoryInterface::class);
    $entity_repository->loadEntityByUuid('lorem', '4e6cb61d-4f04-437f-99fe-42c002393658')
      ->willReturn($entity->reveal());

    $this->normalizer = new ResourceIdentifierNormalizer(
      $field_manager->reveal()
    );
  }

  /** * @covers ::denormalize * @dataProvider denormalizeProvider */
  public function testDenormalize($input$field_name$expected) {
    $entity = $this->prophesize(FieldableEntityInterface::class);
    $context = [
      
Home | Imprint | This part of the site doesn't use cookies.