You are here

public function EntityCreateTest::testActionExecution in Rules 8.3

Tests the action execution.

@covers ::execute

File

tests/src/Unit/Integration/RulesAction/EntityCreateTest.php, line 119

Class

EntityCreateTest
@coversDefaultClass \Drupal\rules\Plugin\RulesAction\EntityCreate @group RulesAction

Namespace

Drupal\Tests\rules\Unit\Integration\RulesAction

Code

public function testActionExecution() {
  $this->action
    ->setContextValue('bundle', 'test');
  $this->action
    ->execute();
  $entity = $this->action
    ->getProvidedContext('test_created')
    ->getContextValue();
  $this
    ->assertEquals(self::ENTITY_REPLACEMENT, $entity);
}