/** * Get the database configuration based on the environment's setting. * * @return mixed */ protected function getDatabaseConfig() { $environment = $this->app->getEnvironment(); $config = $this->app->getConfig('database'); $config = $this->app->arrGet($environment, $config, []); if (empty($config)) { throw new \InvalidArgumentException(sprintf('Database is not configured for [%s] environment!', $environment)); } return $config; }
/** * @expectedException LogicException */ public function testGetConfigInvalidArgumentException() { $app = new App(); $app->getConfig(); }