function BlockContentEntityReferenceSelectionTest::testFieldConditions
Same name in other branches
- 8.9.x core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php \Drupal\Tests\block_content\Kernel\BlockContentEntityReferenceSelectionTest::testFieldConditions()
- 10 core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php \Drupal\Tests\block_content\Kernel\BlockContentEntityReferenceSelectionTest::testFieldConditions()
- 11.x core/modules/block_content/tests/src/Kernel/BlockContentEntityReferenceSelectionTest.php \Drupal\Tests\block_content\Kernel\BlockContentEntityReferenceSelectionTest::testFieldConditions()
Tests setting 'reusable' condition on different levels.
@dataProvider fieldConditionProvider
Throws
\Exception
File
-
core/
modules/ block_content/ tests/ src/ Kernel/ BlockContentEntityReferenceSelectionTest.php, line 170
Class
- BlockContentEntityReferenceSelectionTest
- Tests EntityReference selection handlers don't return non-reusable blocks.
Namespace
Drupal\Tests\block_content\KernelCode
public function testFieldConditions($condition_type, $is_reusable) {
$this->selectionHandler
->setTestMode($condition_type, $is_reusable);
$this->assertEquals($is_reusable ? $this->expectations['block_reusable'] : $this->expectations['block_non_reusable'], $this->selectionHandler
->getReferenceableEntities());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.