public function DateTimeNormalizerTest::testSupportsNormalization in Drupal 8
Same name and namespace in other branches
- 9 core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\DateTimeNormalizerTest::testSupportsNormalization()
- 10 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 58
Class
- DateTimeNormalizerTest
- Unit test coverage for @DataTypes implementing DateTimeInterface.
Namespace
Drupal\Tests\serialization\Unit\NormalizerCode
public function testSupportsNormalization() {
$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()));
}