You are here

protected static function EntityViewsDataTest::userEntityInfo in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Unit/EntityViewsDataTest.php \Drupal\Tests\views\Unit\EntityViewsDataTest::userEntityInfo()

Returns entity info for the user entity.

Return value

array

2 calls to EntityViewsDataTest::userEntityInfo()
EntityViewsDataTest::setupFieldStorageDefinition in core/modules/views/tests/src/Unit/EntityViewsDataTest.php
Helper method to mock all store definitions.
EntityViewsDataTest::testDataTableFields in core/modules/views/tests/src/Unit/EntityViewsDataTest.php
Tests fields on the data table.

File

core/modules/views/tests/src/Unit/EntityViewsDataTest.php, line 1156
Contains \Drupal\Tests\views\Unit\EntityViewsDataTest.

Class

EntityViewsDataTest
@coversDefaultClass \Drupal\views\EntityViewsData @group Views

Namespace

Drupal\Tests\views\Unit

Code

protected static function userEntityInfo() {
  return new ContentEntityType([
    'id' => 'user',
    'class' => 'Drupal\\user\\Entity\\User',
    'label' => 'User',
    'base_table' => 'users',
    'data_table' => 'users_field_data',
    'entity_keys' => [
      'id' => 'uid',
      'uuid' => 'uuid',
    ],
  ]);
}