public function TimestampNormalizerTest::testSupportsNormalization in Drupal 10
Same name and namespace in other branches
- 8 core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampNormalizerTest::testSupportsNormalization()
- 9 core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TimestampNormalizerTest::testSupportsNormalization()
@covers ::supportsNormalization
File
- core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ TimestampNormalizerTest.php, line 50
Class
- TimestampNormalizerTest
- Unit test coverage for the "Timestamp" @DataType.
Namespace
Drupal\Tests\serialization\Unit\NormalizerCode
public function testSupportsNormalization() {
$this
->assertTrue($this->normalizer
->supportsNormalization($this->data
->reveal()));
$integer = $this
->prophesize(IntegerData::class);
$this
->assertFalse($this->normalizer
->supportsNormalization($integer
->reveal()));
$datetime = $this
->prophesize(DateTimeInterface::class);
$this
->assertFalse($this->normalizer
->supportsNormalization($datetime
->reveal()));
}