You are here

public function ExtraFieldManagerBaseTest::allEntityBundlesProvider in Extra Field 8.2

Data provider for allEntityBundles.

Return value

array Contains:

  • entityType (string)
  • bundleType (string)
  • entityBundles (array)
  • output as returned by ::allEntityBundles.

File

tests/src/Unit/ExtraFieldManagerBaseTest.php, line 256

Class

ExtraFieldManagerBaseTest
@coversDefaultClass \Drupal\extra_field\Plugin\ExtraFieldManagerBase

Namespace

Drupal\Tests\extra_field\Unit

Code

public function allEntityBundlesProvider() {
  return [
    [
      // Entity type.
      'entity_type_without_bundle',
      // Bundle type.
      NULL,
      // Entity bundles.
      [],
      // Result.
      [
        'entity_type_without_bundle' => 'entity_type_without_bundle',
      ],
    ],
    [
      // Entity type.
      'node',
      // Bundle type.
      'node_type',
      // Entity bundles.
      [
        'article' => 'article',
        'page' => 'page',
      ],
      // Result.
      [
        'article' => 'article',
        'page' => 'page',
      ],
    ],
  ];
}