function 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

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',
        ],
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.