function ContentEntityBaseUnitTest::providerTestTypedData
Same name and namespace in other branches
- 10 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 359
Class
- ContentEntityBaseUnitTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21ContentEntityBase.php/class/ContentEntityBase/9" title="Implements Entity Field API specific enhancements to the Entity class." class="local">\Drupal\Core\Entity\ContentEntityBase</a> @group Entity @group Access
Namespace
Drupal\Tests\Core\EntityCode
public 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.