You are here

protected function RulesKernelTestBase::createCondition in Rules 8.3

Creates a new condition.

Parameters

string $id: The condition plugin id.

Return value

\Drupal\rules\Core\RulesConditionInterface The created condition plugin.

File

tests/src/Kernel/RulesKernelTestBase.php, line 108

Class

RulesKernelTestBase
Base class for Rules Drupal unit tests.

Namespace

Drupal\Tests\rules\Kernel

Code

protected function createCondition($id) {
  $condition = $this->expressionManager
    ->createInstance('rules_condition', [
    'condition_id' => $id,
  ]);
  return $condition;
}