protected function FeedsMapperTestCase::selectFieldWidget in Feeds 6
Same name and namespace in other branches
- 7.2 tests/feeds_mapper.test \FeedsMapperTestCase::selectFieldWidget()
- 7 tests/feeds_mapper_test.inc \FeedsMapperTestCase::selectFieldWidget()
Select the widget for the field. Default implementation provides widgets for Date, Number, Text, Node reference, User reference, Email, Emfield, Filefield, Image, and Link.
Extracted as a method to allow test implementations to add widgets for the tested CCK field type(s). $field_name allow to test the same field type with different widget (is this useful ?)
Parameters
$field_name: The name of the field.
$field_type: The CCK type of the field.
Return value
The widget for this field, or NULL if the field_type is not supported by this test class.
3 calls to FeedsMapperTestCase::selectFieldWidget()
- FeedsMapperContentTaxonomyTestCase::selectFieldWidget in tests/
feeds_mapper_content_taxonomy.test - Select the widget for the field. Default implementation provides widgets for Date, Number, Text, Node reference, User reference, Email, Emfield, Filefield, Image, and Link.
- FeedsMapperFileFieldTestCase::selectFieldWidget in tests/
feeds_mapper_filefield.test - Handle file field widgets.
- FeedsMapperTestCase::createContentType in tests/
feeds_mapper.test - Create a new content-type, and add a field to it. Mostly copied from cck/tests/content.crud.test ContentUICrud::testAddFieldUI
2 methods override FeedsMapperTestCase::selectFieldWidget()
- FeedsMapperContentTaxonomyTestCase::selectFieldWidget in tests/
feeds_mapper_content_taxonomy.test - Select the widget for the field. Default implementation provides widgets for Date, Number, Text, Node reference, User reference, Email, Emfield, Filefield, Image, and Link.
- FeedsMapperFileFieldTestCase::selectFieldWidget in tests/
feeds_mapper_filefield.test - Handle file field widgets.
File
- tests/
feeds_mapper.test, line 153 - Helper class with auxiliary functions for feeds mapper module tests.
Class
- FeedsMapperTestCase
- Base class for implementing Feeds Mapper test cases.
Code
protected function selectFieldWidget($field_name, $field_type) {
$field_widgets = FeedsMapperTestCase::$field_widgets;
return isset($field_widgets[$field_type]) ? $field_widgets[$field_type] : NULL;
}