function EntityWithoutBaseTableTest::testEntityWithoutDataTable

Tests that the entity without a data table doesn't emit deprecation notice.

@legacy-covers ::defaultFieldImplementation

File

core/modules/views/tests/src/Kernel/EntityWithoutBaseTableTest.php, line 80

Class

EntityWithoutBaseTableTest
Tests field views data in an edge case scenario.

Namespace

Drupal\Tests\views\Kernel

Code

public function testEntityWithoutDataTable() : void {
  $entity_type = $this->container
    ->get('entity_type.manager')
    ->getDefinition('entity_test_label');
  $this->assertNull($entity_type->getDataTable());
  $this->assertNotNull($entity_type->getBaseTable());
  $views_data = $this->container
    ->get('views.views_data')
    ->getAll();
  $this->assertArrayHasKey($entity_type->getBaseTable(), $views_data);
}

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