function DateTimeNormalizerTest::testSupportsNormalization
Same name in other branches
- 9 core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\DateTimeNormalizerTest::testSupportsNormalization()
- 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\DateTimeNormalizerTest::testSupportsNormalization()
- 11.x core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\DateTimeNormalizerTest::testSupportsNormalization()
@covers ::supportsNormalization
File
-
core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ DateTimeNormalizerTest.php, line 60
Class
- DateTimeNormalizerTest
- Unit test coverage for @DataTypes implementing DateTimeInterface.
Namespace
Drupal\Tests\serialization\Unit\NormalizerCode
public function testSupportsNormalization() : void {
$this->assertTrue($this->normalizer
->supportsNormalization($this->data
->reveal()));
$datetimeiso8601 = $this->prophesize(DateTimeIso8601::class);
$this->assertTrue($this->normalizer
->supportsNormalization($datetimeiso8601->reveal()));
$integer = $this->prophesize(IntegerData::class);
$this->assertFalse($this->normalizer
->supportsNormalization($integer->reveal()));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.