public function ContentEntityBaseUnitTest::providerGet in Drupal 9
Same name and namespace in other branches
- 8 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 454
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',
[],
],
];
}