You are here

public function TestSelection::setTestMode in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php \Drupal\block_content_test\Plugin\EntityReferenceSelection\TestSelection::setTestMode()

Sets the test mode.

Parameters

string $condition_type: The condition type.

bool $is_reusable: Whether to set the condition for reusable or non-reusable blocks.

File

core/modules/block_content/tests/modules/block_content_test/src/Plugin/EntityReferenceSelection/TestSelection.php, line 34

Class

TestSelection
Test EntityReferenceSelection with conditions on the 'reusable' field.

Namespace

Drupal\block_content_test\Plugin\EntityReferenceSelection

Code

public function setTestMode($condition_type = NULL, $is_reusable = NULL) {
  $this->conditionType = $condition_type;
  $this->isReusable = $is_reusable;
}