/**
  * @dataProvider configValueProvider
  */
 public function testConfigure($mode)
 {
     $configurationTree = new ConfigurationTree();
     $tree = $configurationTree->getConfigTree(array(new DeprecationExtension()));
     $processor = new Processor();
     $config = $processor->process($tree, array('testwork' => array('caciobanu_deprecation_extension' => array('mode' => $mode))));
     $this->assertEquals(array('caciobanu_deprecation_extension' => array('mode' => $mode)), $config);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (class_exists('Symfony\\Component\\Config\\Definition\\Dumper\\YamlReferenceDumper')) {
         $dumper = new YamlReferenceDumper();
     } else {
         // Support Symfony Config 2.3
         $dumper = new ReferenceDumper();
     }
     $configTree = new ConfigurationTree();
     $output->writeln($dumper->dumpNode($configTree->getConfigTree($this->extensionManager->getExtensions())));
 }
Ejemplo n.º 3
0
 /**
  * Processes config against extensions.
  *
  * @param array $configs
  *
  * @return array
  */
 private function processConfig(array $configs)
 {
     $tree = $this->configuration->getConfigTree($this->extensionManager->getExtensions());
     return $this->processor->process($tree, $configs);
 }