You are here

public function RulesActionManagerTest::testContextDefinitionAnnotations in Rules 8.3

@covers ::getDiscovery

File

tests/src/Unit/Integration/RulesAction/RulesActionManagerTest.php, line 19

Class

RulesActionManagerTest
Tests the Rules action manager.

Namespace

Drupal\Tests\rules\Unit\Integration\RulesAction

Code

public function testContextDefinitionAnnotations() {
  $definitions = $this->actionManager
    ->getDefinitions();

  // Make sure all context definitions are using the class provided by Rules.
  foreach ($definitions as $definition) {
    if (!empty($definition['context_definitions'])) {
      foreach ($definition['context_definitions'] as $context_definition) {
        $this
          ->assertInstanceOf(ContextDefinitionInterface::class, $context_definition);
      }
    }
  }
}