You are here

public function ActionSetExpressionTest::testLookupAction in Rules 8.3

Tests that a nested action can be retrieved by UUID.

File

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

Class

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

Namespace

Drupal\Tests\rules\Unit

Code

public function testLookupAction() {
  $this->actionSet
    ->addExpressionObject($this->testActionExpression
    ->reveal());
  $uuid = $this->testActionExpression
    ->reveal()
    ->getUuid();
  $lookup_action = $this->actionSet
    ->getExpression($uuid);
  $this
    ->assertSame($this->testActionExpression
    ->reveal(), $lookup_action);
  $this
    ->assertFalse($this->actionSet
    ->getExpression('invalid UUID'));
}