protected function DateFieldTestBase::checkDateField in Date 7.2
Same name and namespace in other branches
- 7.3 tests/DateFieldTestBase.test \DateFieldTestBase::checkDateField()
Run some tests against a specific field type/widget combination.
Parameters
string $field_type: The field type to use.
string $widget_type: The widget type to use.
bool $delete_when_done: Whether to delete the field when it's finished; defaults to TRUE.
2 calls to DateFieldTestBase::checkDateField()
- DateFieldTestCase::testField in tests/
DateFieldTestCase.test - Check all of the included field types for basic functionality.
- DatePopupFieldTestCase::testField in date_popup/
tests/ DatePopupFieldTestCase.test - Test the field settings.
1 method overrides DateFieldTestBase::checkDateField()
- DateValidationTestCase::checkDateField in tests/
DateValidationTestCase.test - Run some tests against a specific field type/widget combination.
File
- tests/
DateFieldTestBase.test, line 399 - Shared test functionality.
Class
- DateFieldTestBase
- Shared test functionality.
Code
protected function checkDateField($field_type, $widget_type, $delete_when_done = TRUE) {
$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 - H:i',
);
$this
->createDateField($options);
$this
->dateForm($field_name, $field_type, $widget_type);
if ($delete_when_done) {
$this
->deleteDateField($label);
}
}