function datetime_range_test_entity_type_alter

Same name in other branches
  1. 9 core/modules/datetime_range/tests/modules/datetime_range_test/datetime_range_test.module \datetime_range_test_entity_type_alter()
  2. 8.9.x core/modules/datetime_range/tests/modules/datetime_range_test/datetime_range_test.module \datetime_range_test_entity_type_alter()
  3. 10 core/modules/datetime_range/tests/modules/datetime_range_test/datetime_range_test.module \datetime_range_test_entity_type_alter()

Implements hook_entity_type_alter().

File

core/modules/datetime_range/tests/modules/datetime_range_test/datetime_range_test.module, line 13

Code

function datetime_range_test_entity_type_alter(array &$entity_types) {
    // Inhibit views data for the 'taxonomy_term' entity type in order to cover
    // the case when an entity type provides no views data.
    // @see https://www.drupal.org/project/drupal/issues/2995578
    // @see \Drupal\Tests\datetime_range\Kernel\Views\EntityTypeWithoutViewsDataTest
    $entity_types['taxonomy_term']->setHandlerClass('views_data', NULL);
}

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