function RulesKernelTestBase::createCondition
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 106
Class
- RulesKernelTestBase
- Base class for Rules Drupal unit tests.
Namespace
Drupal\Tests\rules\KernelCode
protected function createCondition($id) {
$condition = $this->expressionManager
->createInstance('rules_condition', [
'condition_id' => $id,
]);
return $condition;
}