TimestampItemNormalizer example


  protected $item;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->normalizer = new TimestampItemNormalizer();
  }

  /** * @covers ::supportsNormalization */
  public function testSupportsNormalization() {
    $timestamp_item = $this->createTimestampItemProphecy();
    $this->assertTrue($this->normalizer->supportsNormalization($timestamp_item->reveal()));

    $entity_ref_item = $this->prophesize(EntityReferenceItem::class);
    $this->assertFalse($this->normalizer->supportsNormalization($entity_ref_item->reveal()));
  }
Home | Imprint | This part of the site doesn't use cookies.