diff --git a/core/modules/options/src/Tests/Views/ViewsDataTest.php b/core/modules/options/src/Tests/Views/ViewsDataTest.php index 3d08910..aea8e63 100644 --- a/core/modules/options/src/Tests/Views/ViewsDataTest.php +++ b/core/modules/options/src/Tests/Views/ViewsDataTest.php @@ -49,16 +49,18 @@ public function setUp() { 'bundle' => 'entity_test', 'required' => TRUE, ])->save(); + + \Drupal::service('views.views_data')->clear(); } /** * Tests the option module's implementation of hook_field_views_data(). */ public function testOptionsFieldViewsData() { - $field_data = options_field_views_data($this->fieldStorage); + $field_data = \Drupal::service('views.views_data')->get('entity_test__test_options'); // Check that the options module has properly overridden default views data. - $test_options_field = $field_data['entity_test__test_options']['test_options_value']; + $test_options_field = $field_data['test_options_value']; $this->assertEqual($test_options_field['argument']['id'], 'string_list_field', 'Argument handler is properly set for fields with allowed value callbacks.'); $this->assertEqual($test_options_field['filter']['id'], 'list_field', 'Filter handler is properly set for fields with allowed value callbacks.'); }