public function ExtraFieldManagerBaseTest::matchEntityBundleKeyProvider in Extra Field 8.2
Data provider for matchEntityBundleKey.
Return value
array Contains:
- pluginBundles (array)
- entityBundleKey (string)
- output as returned by ::matchEntityBundleKey.
File
- tests/
src/ Unit/ ExtraFieldManagerBaseTest.php, line 67
Class
- ExtraFieldManagerBaseTest
- @coversDefaultClass \Drupal\extra_field\Plugin\ExtraFieldManagerBase
Namespace
Drupal\Tests\extra_field\UnitCode
public function matchEntityBundleKeyProvider() {
return [
[
// pluginBundles.
[],
// entityBundleKey.
'',
// result.
FALSE,
],
[
[
'entity_type.bundle',
],
'',
FALSE,
],
[
[
'',
],
'entity_type.bundle',
FALSE,
],
[
[
'entity_type.bundle',
],
'entity_type.bundle',
TRUE,
],
[
[
'entity_type.*',
],
'entity_type.bundle',
TRUE,
],
[
[
'entity_type.bundle',
],
'entity_type.other_bundle',
FALSE,
],
[
[
'entity_type.bundle',
'entity_type.*',
],
'entity_type.other',
TRUE,
],
[
[
'other_entity_type.bundle',
],
'entity_type.bundle',
FALSE,
],
[
[
'other_entity_type.bundle',
'other_entity_type.*',
],
'entity_type.bundle',
FALSE,
],
];
}