Esempio n. 1
0
 /**
  * Tests that provided context definitons are created from configuration.
  */
 public function testProvidedDefinitionFromConfig()
 {
     $rule = new Rule(['provided_definitions' => ['node' => ContextDefinition::create('entity:node')->setLabel('node')->toArray()]], 'rules_rule', [], $this->expressionManager->reveal());
     $provided_definition = $rule->getProvidedContextDefinition('node');
     $this->assertSame($provided_definition->getDataType(), 'entity:node');
 }