public function testArrayNode()
 {
     $this->expectedInvalidConfiguration();
     $array = new ArrayDefinition('drivers');
     $array->append((new IntegerDefinition('port'))->defaultValue(3306))->append((new ScalarDefinition('host'))->defaultValue('localhost')->isRequired());
     $array->getNode()->finalize(array());
 }
 /**
  * Storage config definition template.
  *
  * @return ArrayDefinition
  */
 private function storageDefinitionTemplate()
 {
     $definition = new ArrayDefinition('storage_template');
     $definition->children()->scalarNode('engine')->isRequired()->end()->scalarNode('host')->defaultValue('localhost')->end()->scalarNode('database')->isRequired()->end()->integerNode('port')->defaultNull()->end()->scalarNode('username')->defaultNull()->end()->scalarNode('password')->defaultNull()->end()->end();
     return $definition;
 }
 /**
  * Get tree node.
  *
  * @return NodeInterface|PrototypeNodeInterface
  */
 public function getNode()
 {
     return $this->root->getNode();
 }