function ActionSetExpressionTest::testNestedActionExecution
Tests that nested action sets work.
File
-
tests/
src/ Unit/ ActionSetExpressionTest.php, line 68
Class
- ActionSetExpressionTest
- @coversDefaultClass \Drupal\rules\Plugin\RulesExpression\ActionSetExpression @group Rules
Namespace
Drupal\Tests\rules\UnitCode
public function testNestedActionExecution() {
// The execute method on the test action must be called twice.
$this->testActionExpression
->executeWithState(Argument::type(ExecutionStateInterface::class))
->shouldBeCalledTimes(2);
$inner = new ActionSetExpression([], '', [], $this->expressionManager
->reveal(), $this->rulesDebugLogger
->reveal());
$inner->addExpressionObject($this->testActionExpression
->reveal());
$this->actionSet
->addExpressionObject($this->testActionExpression
->reveal())
->addExpressionObject($inner)
->execute();
}