function DateTimeIso8601NormalizerTest::providerTestDenormalizeValidFormats
Same name in other branches
- 9 core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\DateTimeIso8601NormalizerTest::providerTestDenormalizeValidFormats()
- 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\DateTimeIso8601NormalizerTest::providerTestDenormalizeValidFormats()
- 11.x core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\DateTimeIso8601NormalizerTest::providerTestDenormalizeValidFormats()
Data provider for testDenormalizeValidFormats.
Return value
array
File
-
core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ DateTimeIso8601NormalizerTest.php, line 200
Class
- DateTimeIso8601NormalizerTest
- Unit test coverage for the "datetime_iso8601" @DataType.
Namespace
Drupal\Tests\serialization\Unit\NormalizerCode
public static function providerTestDenormalizeValidFormats() {
$data = [];
$data['just a date'] = [
'date-only',
'2016-11-06',
'2016-11-06',
];
$data['RFC3339'] = [
'date+time',
'2016-11-06T09:02:00+00:00',
'2016-11-06T09:02:00',
];
$data['RFC3339 +0100'] = [
'date+time',
'2016-11-06T09:02:00+01:00',
'2016-11-06T08:02:00',
];
$data['RFC3339 -0600'] = [
'date+time',
'2016-11-06T09:02:00-06:00',
'2016-11-06T15:02:00',
];
$data['ISO8601'] = [
'date+time',
'2016-11-06T09:02:00+0000',
'2016-11-06T09:02:00',
];
$data['ISO8601 +0100'] = [
'date+time',
'2016-11-06T09:02:00+0100',
'2016-11-06T08:02:00',
];
$data['ISO8601 -0600'] = [
'date+time',
'2016-11-06T09:02:00-0600',
'2016-11-06T15:02:00',
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.