function BlockContentEntityReferenceSelectionTest::fieldConditionProvider

Same name in other branches
  1. 9 core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php \Drupal\Tests\block_content\Kernel\BlockContentEntityReferenceSelectionTest::fieldConditionProvider()
  2. 8.9.x core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php \Drupal\Tests\block_content\Kernel\BlockContentEntityReferenceSelectionTest::fieldConditionProvider()
  3. 10 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 182

Class

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

Namespace

Drupal\Tests\block_content\Kernel

Code

public static 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.