public function ExpressionSerializationTest::testConditionContainerExpressionSerialization in Rules 8.3
Tests condition container base class serialization.
File
- tests/
src/ Unit/ Integration/ Engine/ ExpressionSerializationTest.php, line 47
Class
- ExpressionSerializationTest
- Tests serializing expression objects.
Namespace
Drupal\Tests\rules\Unit\Integration\EngineCode
public function testConditionContainerExpressionSerialization() {
$expression = $this->rulesExpressionManager
->createAnd();
$expression
->addCondition('rules_test_false');
$serialized_expression = serialize($expression);
$expression = unserialize($serialized_expression);
$result = $expression
->execute();
$this
->assertFalse($result);
}