function OrExpressionTest::testOneCondition
Tests one condition.
File
-
tests/
src/ Unit/ OrExpressionTest.php, line 35
Class
- OrExpressionTest
- @coversDefaultClass \Drupal\rules\Plugin\RulesExpression\OrExpression @group Rules
Namespace
Drupal\Tests\rules\UnitCode
public function testOneCondition() {
// The method on the test condition must be called once.
$this->trueConditionExpression
->executeWithState(Argument::type(ExecutionStateInterface::class))
->shouldBeCalledTimes(1);
$this->or
->addExpressionObject($this->trueConditionExpression
->reveal());
$this->assertTrue($this->or
->execute(), 'Single condition returns TRUE.');
}