function ConditionExpressionTest::setUp
Overrides UnitTestCase::setUp
File
-
tests/
src/ Unit/ ConditionExpressionTest.php, line 61
Class
- ConditionExpressionTest
- @coversDefaultClass \Drupal\rules\Plugin\RulesExpression\ConditionExpression @group Rules
Namespace
Drupal\Tests\rules\UnitCode
protected function setUp() : void {
parent::setUp();
// Create a test condition plugin that always evaluates to TRUE.
$this->trueCondition = $this->prophesize(RulesConditionInterface::class);
$this->trueCondition
->execute()
->willReturn(TRUE);
$this->trueCondition
->evaluate()
->willReturn(TRUE);
$this->conditionManager = $this->prophesize(ConditionManager::class);
$this->processorManager = $this->prophesize(DataProcessorManager::class);
$this->rulesDebugLogger = $this->prophesize(LoggerChannelInterface::class);
$this->conditionExpression = new ConditionExpression([
'condition_id' => 'test_condition',
], '', [
'label' => 'Test Condition',
], $this->conditionManager
->reveal(), $this->processorManager
->reveal(), $this->rulesDebugLogger
->reveal());
}