/** * @param ArrayNodeDefinition $rootNode */ private function addExceptionHandlerSection(ArrayNodeDefinition $rootNode) { $rootNode->children()->arrayNode('exception_handler')->addDefaultsIfNotSet()->children()->arrayNode('error_page')->addDefaultsIfNotSet()->children()->scalarNode('template_path')->info('Path of the error page templates')->defaultValue(ErrorPageLoader::getDefaultTemplatePath())->end()->end()->end()->end()->end()->end(); }
public function testDefalut() { $config = $this->createConfig(array()); $this->assertEquals(array('server' => array('default' => SwooleServer::isAvaiable() ? 'swoole' : null, 'swoole' => array('enabled' => false, 'transformer' => array('use_server_request' => true, 'response_buffer' => 8096), 'options' => array())), 'request_handler' => array('default' => 'symfony'), 'exception_handler' => array('error_page' => array('template_path' => ErrorPageLoader::getDefaultTemplatePath())), 'executor' => array('default' => 'default', 'executorList' => array('default' => array('server' => ExecutorFactory::USE_DEFAULT_KEY, 'request_handler' => ExecutorFactory::USE_DEFAULT_KEY, 'exception_handler_service' => 'syrma.web_container.exception_handler', 'parent_service' => 'syrma.web_container.executor.abstract', 'use_factory' => true)))), $config); }