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