function HandlerTest::viewsData
Overrides \Drupal\views\Tests\ViewTestBase::viewsData().
Adds:
- a relationship for the uid column.
 - a dummy field with no help text.
 
Overrides ViewTestBase::viewsData
File
- 
              core/
modules/ views_ui/ tests/ src/ Functional/ HandlerTest.php, line 78  
Class
- HandlerTest
 - Tests handler UI for views.
 
Namespace
Drupal\Tests\views_ui\FunctionalCode
protected function viewsData() {
  $data = parent::viewsData();
  $data['views_test_data']['uid'] = [
    'title' => 'UID',
    'help' => 'The test data UID',
    'relationship' => [
      'id' => 'standard',
      'base' => 'users_field_data',
      'base field' => 'uid',
    ],
  ];
  // Create a dummy field with no help text.
  $data['views_test_data']['no_help'] = $data['views_test_data']['name'];
  $data['views_test_data']['no_help']['field']['title'] = 'No help';
  $data['views_test_data']['no_help']['field']['real field'] = 'name';
  unset($data['views_test_data']['no_help']['help']);
  return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.