/**
  * @return Router
  */
 private function getRouter()
 {
     $configBuilder = new ConfigTreeBuilder();
     $configBuilder->addSettingsFromPaths([__DIR__ . '/fixtures/sample_routing_file.php']);
     $wholeConfig = $configBuilder->buildConfigTreeAndReset();
     $routingConfig = $wholeConfig->getSubtreeFromPath('rest-in-peace/routing');
     return new Router($routingConfig);
 }
Пример #2
0
 /**
  * @Given I have told the Config Tree Builder to read the config file :pathToConfigFile
  */
 public function iHaveToldTheConfigTreeBuilderToReadTheConfigFile($pathToConfigFile)
 {
     $this->configTreeBuilder->addSettingsFromPaths([__DIR__ . '/../../../fixtures/merging/' . $pathToConfigFile]);
 }