diff --git a/core/modules/field/lib/Drupal/field/Tests/WidgetTest.php b/core/modules/field/lib/Drupal/field/Tests/WidgetTest.php new file mode 100644 index 0000000..db81335 --- /dev/null +++ b/core/modules/field/lib/Drupal/field/Tests/WidgetTest.php @@ -0,0 +1,45 @@ + 'Field Widget tests', + 'description' => 'Test field widgets.', + 'group' => 'Field API', + ); + } + + /** + * Test the definitions of a widget. + */ + function testWidgetDefinitions() { + + $widget_definition = field_get_plugin_manager('widget')->getDefinition('options_select'); + + // Test if hook_field_widget_info_alter is beïng called. + $this->assertTrue(in_array('taxonomy_term_reference', $widget_definition['field types']), 'hook_field_widget_info_alter is beïng called'); + + } + +}