You are here

public function ActionSetExpressionTest::testActionExecution in Rules 8.3

Tests that an action in the set fires.

File

tests/src/Unit/ActionSetExpressionTest.php, line 37

Class

ActionSetExpressionTest
@coversDefaultClass \Drupal\rules\Plugin\RulesExpression\ActionSetExpression @group Rules

Namespace

Drupal\Tests\rules\Unit

Code

public function testActionExecution() {

  // The execute method on the test action must be called once.
  $this->testActionExpression
    ->executeWithState(Argument::type(ExecutionStateInterface::class))
    ->shouldBeCalledTimes(1);
  $this->actionSet
    ->addExpressionObject($this->testActionExpression
    ->reveal())
    ->execute();
}