/** * @codeCoverageIgnore */ protected function loadDefaults($container) { $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); foreach ($this->resources as $resource) { $loader->load($resource); } }
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); } } }
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()); }
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()); }
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'); }