You are here

protected function RelationshipJoinInTest::viewsData in Drupal 9

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

Adds an IN condition for the user name.

Overrides RelationshipJoinTestBase::viewsData

File

core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinInTest.php, line 137

Class

RelationshipJoinInTest
Tests the base relationship handler.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

protected function viewsData() {
  $data = parent::viewsData();

  // Only relate if the author's name is Kristiaan or Silvie.
  $data['views_test_data']['uid']['relationship']['extra'][] = [
    'field' => 'name',
    'value' => [
      'Kristiaan',
      'Silvie',
    ],
  ];
  return $data;
}