function EntityCreateTest::testRefiningContextDefinitions

Tests the context refining.

@covers ::refineContextDefinitions

File

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

Class

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

Namespace

Drupal\Tests\rules\Unit\Integration\RulesAction

Code

public function testRefiningContextDefinitions() {
    $this->action
        ->setContextValue('bundle', 'bundle_test');
    $this->action
        ->refineContextDefinitions([]);
    $this->assertEquals($this->action
        ->getProvidedContextDefinition('test_created')
        ->getDataType(), 'entity:test:bundle_test');
}