public function DateTimePlusTest::providerTestDates in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php \Drupal\Tests\Component\Datetime\DateTimePlusTest::providerTestDates()
Provides data for date tests.
Return value
array An array of arrays, each containing the input parameters for DateTimePlusTest::testDates().
See also
DateTimePlusTest::testDates().
File
- core/
tests/ Drupal/ Tests/ Component/ Datetime/ DateTimePlusTest.php, line 260 - Contains \Drupal\Tests\Component\Datetime\DateTimePlusTest.
Class
- DateTimePlusTest
- @coversDefaultClass \Drupal\Component\Datetime\DateTimePlus @group Datetime
Namespace
Drupal\Tests\Component\DatetimeCode
public function providerTestDates() {
return array(
// String input.
// Create date object from datetime string.
array(
'2009-03-07 10:30',
'America/Chicago',
'2009-03-07T10:30:00-06:00',
),
// Same during daylight savings time.
array(
'2009-06-07 10:30',
'America/Chicago',
'2009-06-07T10:30:00-05:00',
),
// Create date object from date string.
array(
'2009-03-07',
'America/Chicago',
'2009-03-07T00:00:00-06:00',
),
// Same during daylight savings time.
array(
'2009-06-07',
'America/Chicago',
'2009-06-07T00:00:00-05:00',
),
// Create date object from date string.
array(
'2009-03-07 10:30',
'Australia/Canberra',
'2009-03-07T10:30:00+11:00',
),
// Same during daylight savings time.
array(
'2009-06-07 10:30',
'Australia/Canberra',
'2009-06-07T10:30:00+10:00',
),
);
}