You are here

public function BlockContentEntityReferenceSelectionTest::fieldConditionProvider in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php \Drupal\Tests\block_content\Kernel\BlockContentEntityReferenceSelectionTest::fieldConditionProvider()

Provides possible fields and condition types.

File

core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php, line 175

Class

BlockContentEntityReferenceSelectionTest
Tests EntityReference selection handlers don't return non-reusable blocks.

Namespace

Drupal\Tests\block_content\Kernel

Code

public function fieldConditionProvider() {
  $cases = [];
  foreach ([
    'base',
    'group',
    'nested_group',
  ] as $condition_type) {
    foreach ([
      TRUE,
      FALSE,
    ] as $reusable) {
      $cases["{$condition_type}:" . ($reusable ? 'reusable' : 'non-reusable')] = [
        $condition_type,
        $reusable,
      ];
    }
  }
  return $cases;
}