private function setupDatabaseOverrides(InputInterface $input, Fixture $fixture) { $testingEnvironment = $fixture->getTestEnvironment(); $optionsToOverride = array('dbname' => $fixture->getDbName(), 'host' => $input->getOption('db-host'), 'username' => $input->getOption('db-user'), 'password' => $input->getOption('db-pass')); foreach ($optionsToOverride as $configOption => $value) { if ($value) { $configOverride = $testingEnvironment->configOverride; $configOverride['database_tests'][$configOption] = $configOverride['database'][$configOption] = $value; $testingEnvironment->configOverride = $configOverride; Config::getInstance()->database[$configOption] = $value; } } }