function ContentEntityBaseUnitTest::providerGetFields
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest::providerGetFields()
- 10 core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest::providerGetFields()
- 11.x core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest::providerGetFields()
Data provider for testGetFields().
@returns array
- Expected output from getFields().
- $include_computed value to pass to getFields().
- Value to mock from all field definitions for isComputed().
- Array of field names to return from mocked getFieldDefinitions(). A Drupal\Core\Field\FieldDefinitionInterface object will be mocked for each name.
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ ContentEntityBaseUnitTest.php, line 597
Class
- ContentEntityBaseUnitTest
- @coversDefaultClass \Drupal\Core\Entity\ContentEntityBase @group Entity @group Access
Namespace
Drupal\Tests\Core\EntityCode
public function providerGetFields() {
return [
[
[],
FALSE,
FALSE,
[],
],
[
[
'field' => 'field',
'field2' => 'field2',
],
TRUE,
FALSE,
[
'field',
'field2',
],
],
[
[
'field3' => 'field3',
],
TRUE,
TRUE,
[
'field3',
],
],
[
[],
FALSE,
TRUE,
[
'field4',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.