public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__ . '/config/config.php'); if ($this->getEnvironment() !== 'behat' && file_exists(ResourceContext::getConfigurationFile())) { $loader->import(ResourceContext::getConfigurationFile()); } }
/** * {@inheritdoc} */ public function registerContainerConfiguration(LoaderInterface $loader) { $loader->import($this->getRootDir() . '/config/parameters.php'); $loader->load(function ($container) { $container->loadFromExtension('framework', array('test' => null, 'secret' => 'secret', 'router' => array('resource' => '%kernel.root_dir%/config/routing.yml'))); $container->loadFromExtension('doctrine', array('dbal' => array('driver' => 'pdo_mysql', 'dbname' => 'symfony_project', 'user' => '%database.user%', 'password' => '%database.password%', 'server_version' => '5.6'), 'orm' => array('auto_mapping' => false, 'mappings' => array('Lakion\\ApiTestCase' => array('dir' => '%kernel.root_dir%/config/doctrine', 'prefix' => 'Lakion\\ApiTestCase\\Test\\Entity', 'alias' => 'ApiTestCase', 'is_bundle' => false, 'type' => 'yml'))))); $container->setDefinition('app.service', new Definition('Lakion\\ApiTestCase\\Test\\Service\\DummyService')); }); }
/** * Loading the config for the current evironment * and importing platform-specific parameters depending of computer's name * * With this system you can store/commit/track (or not with .gitignore) every change in * every config on every computer. Reduce the rate of "But it works on my computer !" * * I prefer this system than one from Incenteev but you can mix both * * @param \Symfony\Component\Config\Loader\LoaderInterface $loader */ public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load($this->rootDir . '/config/config_' . $this->getEnvironment() . '.yml'); $loader->import($this->rootDir . Script::getPlatformSubdir() . Script::getPlatformName() . '.yml'); }
public function registerContainerConfiguration(LoaderInterface $loader) { $loader->import(CMF_TEST_CONFIG_DIR . '/default.php'); $loader->import(CMF_TEST_CONFIG_DIR . '/phpcr_odm.php'); $loader->load(__DIR__ . '/config/config.yml'); }