Skip to content
Snippets Groups Projects
Commit 7b6212bd authored by Maddy Chellathurai's avatar Maddy Chellathurai
Browse files

MAGETWO-36920: Use dashes instead of underscores in option names

- db-host
- db-name
- db-user
- db-password
- db-prefix
- db-model
- db_init_statements
parent 669a2b23
No related merge requests found
...@@ -9,10 +9,10 @@ return [ ...@@ -9,10 +9,10 @@ return [
'language' => 'en_US', 'language' => 'en_US',
'timezone' => 'America/Los_Angeles', 'timezone' => 'America/Los_Angeles',
'currency' => 'USD', 'currency' => 'USD',
'db_host' => 'localhost', 'db-host' => 'localhost',
'db_name' => 'magento_functional_tests', 'db-name' => 'magento_functional_tests',
'db_user' => 'root', 'db-user' => 'root',
'db_password' => '', 'db-password' => '',
'backend-frontname' => 'backend', 'backend-frontname' => 'backend',
'base_url' => 'http://localhost/', 'base_url' => 'http://localhost/',
'use_secure' => '0', 'use_secure' => '0',
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
*/ */
return [ return [
'db_host' => 'localhost', 'db-host' => 'localhost',
'db_user' => 'root', 'db-user' => 'root',
'db_password' => '', 'db-password' => '',
'db_name' => 'magento_integration_tests', 'db-name' => 'magento_integration_tests',
'db_prefix' => '', 'db-prefix' => '',
'backend-frontname' => 'backend', 'backend-frontname' => 'backend',
'admin_user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME, 'admin_user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
'admin_password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD, 'admin_password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
*/ */
return [ return [
'db_host' => '127.0.0.1', 'db-host' => '127.0.0.1',
'db_user' => 'travis', 'db-user' => 'travis',
'db_password' => '', 'db-password' => '',
'db_name' => 'magento_integration_tests', 'db-name' => 'magento_integration_tests',
'db_prefix' => 'travis_', 'db-prefix' => 'travis_',
'backend-frontname' => 'backend', 'backend-frontname' => 'backend',
'admin_user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME, 'admin_user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
'admin_password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD, 'admin_password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
......
...@@ -172,10 +172,10 @@ class Application ...@@ -172,10 +172,10 @@ class Application
$dbName = $dbInfo['dbname']; $dbName = $dbInfo['dbname'];
} else { } else {
$installConfig = $this->getInstallConfig(); $installConfig = $this->getInstallConfig();
$host = $installConfig['db_host']; $host = $installConfig['db-host'];
$user = $installConfig['db_user']; $user = $installConfig['db-user'];
$password = $installConfig['db_password']; $password = $installConfig['db-password'];
$dbName = $installConfig['db_name']; $dbName = $installConfig['db-name'];
} }
$this->_db = new Db\Mysql( $this->_db = new Db\Mysql(
$host, $host,
......
...@@ -21,7 +21,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase ...@@ -21,7 +21,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
$db = Bootstrap::getInstance()->getBootstrap()->getApplication()->getDbInstance(); $db = Bootstrap::getInstance()->getBootstrap()->getApplication()->getDbInstance();
$command = $checkerPath . ' -d ' . $db->getSchema() $command = $checkerPath . ' -d ' . $db->getSchema()
. ' h=' . $db->getHost()['db_host'] . ',u=' . $db->getUser() . ',p=' . $db->getPassword(); . ' h=' . $db->getHost()['db-host'] . ',u=' . $db->getUser() . ',p=' . $db->getPassword();
exec($command, $output, $exitCode); exec($command, $output, $exitCode);
$this->assertEquals(0, $exitCode); $this->assertEquals(0, $exitCode);
......
...@@ -13,10 +13,10 @@ return array( ...@@ -13,10 +13,10 @@ return array(
'language' => 'en_US', 'language' => 'en_US',
'timezone' => 'America/Los_Angeles', 'timezone' => 'America/Los_Angeles',
'currency' => 'USD', 'currency' => 'USD',
'db_host' => 'localhost', 'db-host' => 'localhost',
'db_name' => 'magento', 'db-name' => 'magento',
'db_user' => 'root', 'db-user' => 'root',
'db_password' => '', 'db-password' => '',
'use_secure' => '0', 'use_secure' => '0',
'use_secure_admin' => '0', 'use_secure_admin' => '0',
'use_rewrites' => '0', 'use_rewrites' => '0',
......
...@@ -34,13 +34,13 @@ class ConfigOptionsList implements ConfigOptionsListInterface ...@@ -34,13 +34,13 @@ class ConfigOptionsList implements ConfigOptionsListInterface
const INPUT_KEY_ENCRYPTION_KEY = 'key'; const INPUT_KEY_ENCRYPTION_KEY = 'key';
const INPUT_KEY_SESSION_SAVE = 'session-save'; const INPUT_KEY_SESSION_SAVE = 'session-save';
const INPUT_KEY_DEFINITION_FORMAT = 'definition-format'; const INPUT_KEY_DEFINITION_FORMAT = 'definition-format';
const INPUT_KEY_DB_HOST = 'db_host'; const INPUT_KEY_DB_HOST = 'db-host';
const INPUT_KEY_DB_NAME = 'db_name'; const INPUT_KEY_DB_NAME = 'db-name';
const INPUT_KEY_DB_USER = 'db_user'; const INPUT_KEY_DB_USER = 'db-user';
const INPUT_KEY_DB_PASSWORD = 'db_password'; const INPUT_KEY_DB_PASSWORD = 'db-password';
const INPUT_KEY_DB_PREFIX = 'db_prefix'; const INPUT_KEY_DB_PREFIX = 'db-prefix';
const INPUT_KEY_DB_MODEL = 'db_model'; const INPUT_KEY_DB_MODEL = 'db-model';
const INPUT_KEY_DB_INIT_STATEMENTS = 'db_init_statements'; const INPUT_KEY_DB_INIT_STATEMENTS = 'db-init-statements';
const INPUT_KEY_RESOURCE = 'resource'; const INPUT_KEY_RESOURCE = 'resource';
/**#@-*/ /**#@-*/
......
...@@ -33,7 +33,7 @@ class ConfigSetCommandTest extends \PHPUnit_Framework_TestCase ...@@ -33,7 +33,7 @@ class ConfigSetCommandTest extends \PHPUnit_Framework_TestCase
$option $option
->expects($this->any()) ->expects($this->any())
->method('getName') ->method('getName')
->will($this->returnValue('db_host')); ->will($this->returnValue('db-host'));
$this->configModel = $this->getMock('Magento\Setup\Model\ConfigModel', [], [], '', false); $this->configModel = $this->getMock('Magento\Setup\Model\ConfigModel', [], [], '', false);
$this->configModel $this->configModel
->expects($this->exactly(2)) ->expects($this->exactly(2))
...@@ -53,9 +53,9 @@ class ConfigSetCommandTest extends \PHPUnit_Framework_TestCase ...@@ -53,9 +53,9 @@ class ConfigSetCommandTest extends \PHPUnit_Framework_TestCase
$this->configModel $this->configModel
->expects($this->once()) ->expects($this->once())
->method('process') ->method('process')
->with(['db_host' => 'host']); ->with(['db-host' => 'host']);
$commandTester = new CommandTester($this->command); $commandTester = new CommandTester($this->command);
$commandTester->execute(['--db_host' => 'host']); $commandTester->execute(['--db-host' => 'host']);
$this->assertSame( $this->assertSame(
'You saved the new configuration.' . PHP_EOL, 'You saved the new configuration.' . PHP_EOL,
$commandTester->getDisplay() $commandTester->getDisplay()
...@@ -71,7 +71,7 @@ class ConfigSetCommandTest extends \PHPUnit_Framework_TestCase ...@@ -71,7 +71,7 @@ class ConfigSetCommandTest extends \PHPUnit_Framework_TestCase
$this->configModel $this->configModel
->expects($this->once()) ->expects($this->once())
->method('process') ->method('process')
->with(['db_host' => 'host']); ->with(['db-host' => 'host']);
$this->checkInteraction(true); $this->checkInteraction(true);
} }
...@@ -112,7 +112,7 @@ class ConfigSetCommandTest extends \PHPUnit_Framework_TestCase ...@@ -112,7 +112,7 @@ class ConfigSetCommandTest extends \PHPUnit_Framework_TestCase
$this->command->setHelperSet($helperSet); $this->command->setHelperSet($helperSet);
$commandTester = new CommandTester($this->command); $commandTester = new CommandTester($this->command);
$commandTester->execute(['--db_host' => 'host']); $commandTester->execute(['--db-host' => 'host']);
if ($interactionType) { if ($interactionType) {
$message = 'You saved the new configuration.' . PHP_EOL; $message = 'You saved the new configuration.' . PHP_EOL;
} else { } else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment