function RulesConditionContainerTest::testAddExpressionObject
Tests adding conditions to the condition container.
@covers ::addExpressionObject
File
-
tests/
src/ Unit/ RulesConditionContainerTest.php, line 44
Class
- RulesConditionContainerTest
- @coversDefaultClass \Drupal\rules\Engine\ConditionExpressionContainer @group Rules
Namespace
Drupal\Tests\rules\UnitCode
public function testAddExpressionObject() {
$container = $this->getMockConditionContainer();
$container->addExpressionObject($this->trueConditionExpression
->reveal());
$property = new \ReflectionProperty($container, 'conditions');
$property->setAccessible(TRUE);
$this->assertEquals([
$this->trueConditionExpression
->reveal(),
], array_values($property->getValue($container)));
}