function TimestampItemNormalizerTest::testSupportsNormalization
Same name in other branches
- 9 core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampItemNormalizerTest::testSupportsNormalization()
- 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampItemNormalizerTest::testSupportsNormalization()
- 10 core/modules/serialization/tests/src/Unit/Normalizer/TimestampItemNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampItemNormalizerTest::testSupportsNormalization()
@covers ::supportsNormalization
File
-
core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ TimestampItemNormalizerTest.php, line 52
Class
- TimestampItemNormalizerTest
- Tests that TimestampItem (de)normalization uses Timestamp (de)normalization.
Namespace
Drupal\Tests\serialization\Unit\NormalizerCode
public function testSupportsNormalization() : void {
$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()));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.