You are here

public static function ViewsTestEntity::setMockedBaseFieldDefinitions in Drupal 10

Sets up the mocked base field definitions.

Parameters

string $entity_type_id: The entity type ID.

array $definitions: The array of base field definitions to mock. These are added to the defaults ones from the parent class.

1 call to ViewsTestEntity::setMockedBaseFieldDefinitions()
EntityViewsDataTest::setUpEntityType in core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php
Mocks an entity type and its base fields.

File

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

Class

ViewsTestEntity
Generic entity class for our test entity types.

Namespace

Drupal\Tests\views\Kernel\Entity

Code

public static function setMockedBaseFieldDefinitions(string $entity_type_id, array $definitions) {
  static::$mockedBaseFieldDefinitions[$entity_type_id] = $definitions;
}