function ContentEntityBaseUnitTest::providerGet
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest::providerGet()
- 10 core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest::providerGet()
- 11.x core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest::providerGet()
Data provider for testGet().
@returns
- Expected output from get().
- Field name parameter to get().
- Language code for $activeLanguage.
- Fields array for $fields.
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ ContentEntityBaseUnitTest.php, line 533
Class
- ContentEntityBaseUnitTest
- @coversDefaultClass \Drupal\Core\Entity\ContentEntityBase @group Entity @group Access
Namespace
Drupal\Tests\Core\EntityCode
public function providerGet() {
return [
// Populated fields array.
[
'result',
'field_name',
'langcode',
[
'field_name' => [
'langcode' => 'result',
],
],
],
// Incomplete fields array.
[
'getTranslatedField_result',
'field_name',
'langcode',
[
'field_name' => 'no_langcode',
],
],
// Empty fields array.
[
'getTranslatedField_result',
'field_name',
'langcode',
[],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.