function RulesComponentTest::testGetProvidedContext

@covers ::getProvidedContext

File

tests/src/Unit/Integration/Engine/RulesComponentTest.php, line 65

Class

RulesComponentTest
Tests the Rules component class.

Namespace

Drupal\Tests\rules\Unit\Integration\Engine

Code

public function testGetProvidedContext() {
    $rule = $this->rulesExpressionManager
        ->createRule();
    $component = RulesComponent::create($rule)->provideContext('test');
    $this->assertEquals($component->getProvidedContext(), [
        'test',
    ]);
}