function EntityFetchByIdTest::testRefiningContextDefinitions

@covers ::refineContextDefinitions

File

tests/src/Unit/Integration/RulesAction/EntityFetchByIdTest.php, line 70

Class

EntityFetchByIdTest
@coversDefaultClass \Drupal\rules\Plugin\RulesAction\EntityFetchById @group RulesAction

Namespace

Drupal\Tests\rules\Unit\Integration\RulesAction

Code

public function testRefiningContextDefinitions() {
    $this->action
        ->setContextValue('type', 'entity_test');
    $this->action
        ->refineContextDefinitions([]);
    $this->assertEquals($this->action
        ->getProvidedContextDefinition('entity_fetched')
        ->getDataType(), 'entity:entity_test');
}