public function ExtraFieldManagerBaseTest::supportedEntityBundlesProvider in Extra Field 8.2
Data provider for supportedEntityBundles.
Return value
array Contains:
- Entity bundle keys.
- Output as retured by ::supportedEntityBundles
File
- tests/
src/ Unit/ ExtraFieldManagerBaseTest.php, line 164
Class
- ExtraFieldManagerBaseTest
- @coversDefaultClass \Drupal\extra_field\Plugin\ExtraFieldManagerBase
Namespace
Drupal\Tests\extra_field\UnitCode
public function supportedEntityBundlesProvider() {
return [
[
// Entity bundle keys.
[
'',
],
// Result.
[],
],
[
// Entity bundle keys.
[
'*',
],
// Result.
[],
],
[
// Entity bundle keys.
[
'node.article',
],
// Result.
[
'node.article' => [
'entity' => 'node',
'bundle' => 'article',
],
],
],
[
// Entity bundle keys.
[
'node.*',
],
// Result.
[
'node.article' => [
'entity' => 'node',
'bundle' => 'article',
],
'node.page' => [
'entity' => 'node',
'bundle' => 'page',
],
],
],
[
// Entity bundle keys.
[
'no_bundles.*',
],
// Result.
[
'no_bundles.no_bundles' => [
'entity' => 'no_bundles',
'bundle' => 'no_bundles',
],
],
],
];
}