/**
  * @codeCoverageIgnore
  */
 protected function loadDefaults($container)
 {
     $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     foreach ($this->resources as $resource) {
         $loader->load($resource);
     }
 }
Пример #2
0
 public function load(array $config, ContainerBuilder $container)
 {
     $container->setParameter('boomerang.default_service', sprintf('boomerang.%s', @$config['default_service'] ?: 'guerrillamail'));
     unset($config['default_service']);
     $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/services'));
     $loader->load('core.xml');
     foreach ($config as $service => $parameters) {
         $loader->load("{$service}.xml");
         foreach ($parameters as $name => $value) {
             $container->setParameter("boomerang.{$service}.{$name}", $value);
         }
     }
 }
Пример #3
0
 public function testUrlWithTrailingSlash()
 {
     $webspace = $this->loader->load(__DIR__ . '/../../../../Resources/DataFixtures/Webspace/url-with-trailing-slash/sulu.io_url_with_slash.xml');
     $environmentDev = $webspace->getPortals()[0]->getEnvironment('dev');
     $this->assertEquals('dev', $environmentDev->getType());
     $this->assertEquals(2, count($environmentDev->getUrls()));
     $this->assertEquals('sulu-without-slash.lo', $environmentDev->getUrls()[0]->getUrl());
     $this->assertEquals('sulu-with-slash.lo', $environmentDev->getUrls()[1]->getUrl());
 }
Пример #4
0
 public function testXDefaulLocaleNotExists()
 {
     $webspace = $this->loader->load(__DIR__ . '/../../../../Resources/DataFixtures/Webspace/xdefault/sulu.io_no_xdefault_locale.xml');
     $this->assertEquals('de_at', $webspace->getPortals()[0]->getDefaultLocalization()->getLocalization());
     $this->assertEquals('de_at', $webspace->getPortals()[0]->getXDefaultLocalization()->getLocalization());
 }
Пример #5
0
 public function load(array $configs, ContainerBuilder $container)
 {
     $loader = new XmlFileLoader($container, new FileLocator('/app/config'));
     $loader->load('config,.xml');
 }
 public function load(array $configs, ContainerBuilder $container)
 {
     $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('twig.xml');
 }