You are here

protected function RelationshipJoinTestBase::schemaDefinition in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::schemaDefinition()
  2. 10 core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php \Drupal\Tests\views\Kernel\Plugin\RelationshipJoinTestBase::schemaDefinition()

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

Adds a uid column to test the relationships.

@internal

Overrides ViewsKernelTestBase::schemaDefinition

File

core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php, line 50

Class

RelationshipJoinTestBase
Provides a base class for a testing a relationship.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

protected function schemaDefinition() {
  $schema = parent::schemaDefinition();
  $schema['views_test_data']['fields']['uid'] = [
    'description' => "The {users_field_data}.uid of the author of the beatle entry.",
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ];
  return $schema;
}