function EntityViewsDataTest::testDeprecations

Same name and namespace in other branches
  1. 11.x core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php \Drupal\Tests\views\Kernel\Entity\EntityViewsDataTest::testDeprecations()

Tests EntityViewsData deprecations.

Attributes

#[IgnoreDeprecations]

File

core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php, line 680

Class

EntityViewsDataTest
Tests entity views data.

Namespace

Drupal\Tests\views\Kernel\Entity

Code

public function testDeprecations() : void {
  $this->baseEntityType
    ->setHandlerClass('views_data', EntityViewsDataWithDeprecations::class);
  $this->setUpEntityType($this->baseEntityType, $this->commonBaseFields);
  $this->expectDeprecation('Drupal\\views\\EntityViewsData::getFieldStorageDefinitions() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. No replacement is provided. See https://www.drupal.org/node/3240278');
  $this->entityTypeManager
    ->getHandler('entity_test', 'views_data')
    ->getViewsData();
}

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