You are here

protected function RelationshipJoinTestBase::viewsData in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php \Drupal\views\Tests\Plugin\RelationshipJoinTestBase::viewsData()

Overrides \Drupal\views\Tests\ViewTestBase::viewsData().

Adds a relationship for the uid column.

Overrides ViewKernelTestBase::viewsData

File

core/modules/views/src/Tests/Plugin/RelationshipJoinTestBase.php, line 71
Contains \Drupal\views\Tests\Plugin\RelationshipJoinTestBase.

Class

RelationshipJoinTestBase
Provides a base class for a testing a relationship.

Namespace

Drupal\views\Tests\Plugin

Code

protected function viewsData() {
  $data = parent::viewsData();
  $data['views_test_data']['uid'] = array(
    'title' => t('UID'),
    'help' => t('The test data UID'),
    'relationship' => array(
      'id' => 'standard',
      'base' => 'users_field_data',
      'base field' => 'uid',
    ),
  );
  return $data;
}