function ViewsTestEntity::setMockedBaseFieldDefinitions
Same name in other branches
- 10 core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php \Drupal\Tests\views\Kernel\Entity\ViewsTestEntity::setMockedBaseFieldDefinitions()
- 11.x core/modules/views/tests/src/Kernel/Entity/EntityViewsDataTest.php \Drupal\Tests\views\Kernel\Entity\ViewsTestEntity::setMockedBaseFieldDefinitions()
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 852
Class
- ViewsTestEntity
- Generic entity class for our test entity types.
Namespace
Drupal\Tests\views\Kernel\EntityCode
public static function setMockedBaseFieldDefinitions(string $entity_type_id, array $definitions) {
static::$mockedBaseFieldDefinitions[$entity_type_id] = $definitions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.