function EntityViewsDataTest::testGetViewsDataWithEntityOperations

@covers ::getViewsData

File

core/modules/views/tests/src/Unit/EntityViewsDataTest.php, line 1009

Class

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

Namespace

Drupal\Tests\views\Unit

Code

public function testGetViewsDataWithEntityOperations() {
    $this->baseEntityType
        ->setListBuilderClass('\\Drupal\\Core\\Entity\\EntityListBuilder');
    $data = $this->viewsData
        ->getViewsData();
    $tables = [
        'entity_test',
        'entity_test_revision',
    ];
    $this->assertSame($tables, array_keys($data));
    foreach ($tables as $table_name) {
        $this->assertSame('entity_operations', $data[$table_name]['operations']['field']['id']);
    }
}

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