function ContentEntityBaseUnitTest::providerTestTypedData
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest::providerTestTypedData()
- 11.x core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest::providerTestTypedData()
Data provider for the ::getTypedData() test.
The following entity data definitions, the first two being derivatives of the last definition, will be tested in order:
1. entity:$entity_type:$bundle 2. entity:$entity_type 3. entity
Return value
array Array of arrays with the following elements:
- A bool whether to provide a bundle-specific definition.
- A bool whether to provide an entity type-specific definition.
See also
\Drupal\Core\Entity\EntityBase::getTypedData()
\Drupal\Core\Entity\EntityBase::getTypedDataClass()
\Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ ContentEntityBaseUnitTest.php, line 365
Class
- ContentEntityBaseUnitTest
- @coversDefaultClass \Drupal\Core\Entity\ContentEntityBase @group Entity @group Access
Namespace
Drupal\Tests\Core\EntityCode
public static function providerTestTypedData() : array {
return [
'Entity data definition derivative with entity type and bundle' => [
TRUE,
TRUE,
],
'Entity data definition derivative with entity type' => [
FALSE,
TRUE,
],
'Entity data definition' => [
FALSE,
FALSE,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.