public function TimestampItemNormalizerTest::testSupportsNormalization in Drupal 9
Same name and namespace in other branches
- 8 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 50
Class
- TimestampItemNormalizerTest
- Tests that TimestampItem (de)normalization uses Timestamp (de)normalization.
Namespace
Drupal\Tests\serialization\Unit\NormalizerCode
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()));
}