1 date_field.test | public DateFieldTestCase::testField() |
@todo.
File
- core/
modules/ date/ tests/ date_field.test, line 269 - Basic functions for Date tests.
Class
Code
public function testField() {
// Create a date fields with simple values.
foreach (array('date', 'datestamp', 'datetime') as $field_type) {
foreach (array('date_select', 'date_popup', 'date_text', 'date_html5') as $widget_type) {
$field_name = "field_test_$widget_type";
$label = 'Test';
$options = array(
'label' => $label,
'widget_type' => $widget_type,
'field_name' => $field_name,
'field_type' => $field_type,
'input_format' => 'm/d/Y - g:ia',
);
$this->createDateField($options);
$this->dateForm($field_name, $field_type, $widget_type);
$this->deleteDateField($label, $field_name);
}
}
}