public function DateTimezoneTestCase::testMultiUserTimezone in Date 7.2
Same name and namespace in other branches
- 7.3 tests/DateTimezoneTestCase.test \DateTimezoneTestCase::testMultiUserTimezone()
Validates timezone handling with a multi-value date field.
File
- tests/
DateTimezoneTestCase.test, line 95 - Test timezone handling.
Class
- DateTimezoneTestCase
- Test timezone handling.
Code
public function testMultiUserTimezone() {
// Create date fields with combinations of various types and granularity
// using the "Date's Timezone" strategy.
$field_type = 'datetime';
$tz_handling = 'date';
$max_granularity = 'minute';
// Create date field.
$field_name = "field_test";
$label = 'Test';
$options = array(
'label' => $label,
'widget_type' => 'date_text',
'field_name' => $field_name,
'field_type' => $field_type,
'input_format' => 'custom',
'input_format_custom' => 'm/d/Y - H:i:s T',
'cardinality' => 3,
'tz_handling' => $tz_handling,
);
$this
->createMultiDateField($options);
// Submit a date field form with multiple values.
$this
->dateMultiValueForm($field_name, $field_type, $max_granularity, $tz_handling);
$this
->deleteDateField($label);
}