Skip to content

Commit 1aaceaf

Browse files
committed
Merge pull request #239 from magento-ogre/develop
[Ogres] Moving install command to Magento Console and Bug Fixes
2 parents 0772e62 + b332585 commit 1aaceaf

File tree

116 files changed

+3535
-2604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+3535
-2604
lines changed

app/code/Magento/Log/Test/Unit/Model/VisitorTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,23 @@ public function testGetUrl()
122122
public function testGetFirstVisitAt()
123123
{
124124
$time = time();
125-
$this->assertEquals($time, $this->visitor->getFirstVisitAt());
125+
$this->assertEquals(
126+
$time,
127+
$this->visitor->getFirstVisitAt(),
128+
'VisitorTest failed to assert the time for the first visit within 5 seconds.',
129+
5
130+
);
126131
}
127132

128133
public function testGetLastVisitAt()
129134
{
130135
$time = time();
131-
$this->assertEquals($time, $this->visitor->getLastVisitAt());
136+
$this->assertEquals(
137+
$time,
138+
$this->visitor->getLastVisitAt(),
139+
'VisitorTest failed to assert the time for the last visit within 5 seconds.',
140+
5
141+
);
132142
}
133143

134144
public function testLogNewVisitor()

bin/magento

100644100755
File mode changed.

dev/tests/api-functional/config/install-config-mysql.php.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ return [
1212
'db_host' => 'localhost',
1313
'db_name' => 'magento_functional_tests',
1414
'db_user' => 'root',
15-
'db_pass' => '',
15+
'db_password' => '',
1616
'backend_frontname' => 'backend',
1717
'base_url' => 'http://localhost/',
1818
'use_secure' => '0',
1919
'use_rewrites' => '0',
2020
'admin_lastname' => 'Admin',
2121
'admin_firstname' => 'Admin',
2222
'admin_email' => 'admin@example.com',
23-
'admin_username' => 'admin',
23+
'admin_user' => 'admin',
2424
'admin_password' => '123123q',
2525
'admin_use_security_key' => '0',
2626
/* PayPal has limitation for order number - 20 characters. 10 digits prefix + 8 digits number is good enough */

dev/tests/api-functional/framework/Magento/TestFramework/WebApiApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function install()
3333

3434
/* Install application */
3535
if ($installOptions) {
36-
$installCmd = 'php -f ' . BP . '/setup/index.php install';
36+
$installCmd = 'php -f ' . BP . '/bin/magento setup:install';
3737
$installArgs = [];
3838
foreach ($installOptions as $optionName => $optionValue) {
3939
if (is_bool($optionValue)) {

dev/tests/functional/tests/app/Magento/Install/Test/TestCase/InstallTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function __inject(Install $installPage, CmsIndex $homePage)
9090
{
9191
$magentoBaseDir = dirname(dirname(dirname(MTF_BP)));
9292
// Uninstall Magento.
93-
shell_exec("php -f $magentoBaseDir/setup/index.php uninstall");
93+
shell_exec("php -f $magentoBaseDir/bin/magento setup:uninstall -n");
9494
$this->installPage = $installPage;
9595
$this->homePage = $homePage;
9696
}

dev/tests/integration/etc/install-config-mysql.php.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
return [
88
'db_host' => 'localhost',
99
'db_user' => 'root',
10-
'db_pass' => '',
10+
'db_password' => '',
1111
'db_name' => 'magento_integration_tests',
1212
'db_prefix' => '',
1313
'backend_frontname' => 'backend',
14-
'admin_username' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
14+
'admin_user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
1515
'admin_password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
1616
'admin_email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL,
1717
'admin_firstname' => \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME,

dev/tests/integration/etc/install-config-mysql.travis.php.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
return [
88
'db_host' => '127.0.0.1',
99
'db_user' => 'travis',
10-
'db_pass' => '',
10+
'db_password' => '',
1111
'db_name' => 'magento_integration_tests',
1212
'db_prefix' => 'travis_',
1313
'backend_frontname' => 'backend',
14-
'admin_username' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
14+
'admin_user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
1515
'admin_password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
1616
'admin_email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL,
1717
'admin_firstname' => \Magento\TestFramework\Bootstrap::ADMIN_FIRSTNAME,

dev/tests/integration/framework/Magento/TestFramework/Application.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function getDbInstance()
174174
$installConfig = $this->getInstallConfig();
175175
$host = $installConfig['db_host'];
176176
$user = $installConfig['db_user'];
177-
$password = $installConfig['db_pass'];
177+
$password = $installConfig['db_password'];
178178
$dbName = $installConfig['db_name'];
179179
}
180180
$this->_db = new Db\Mysql(
@@ -371,12 +371,16 @@ public function run()
371371
*/
372372
public function cleanup()
373373
{
374+
$this->_ensureDirExists($this->installDir);
375+
$this->_ensureDirExists($this->_configDir);
376+
377+
$this->copyAppConfigFiles();
374378
/**
375379
* @see \Magento\Setup\Mvc\Bootstrap\InitParamListener::BOOTSTRAP_PARAM
376380
*/
377381
$this->_shell->execute(
378-
'php -f %s uninstall --magento_init_params=%s',
379-
[BP . '/setup/index.php', $this->getInitParamsQuery()]
382+
'php -f %s setup:uninstall -n --magento_init_params=%s',
383+
[BP . '/bin/magento', $this->getInitParamsQuery()]
380384
);
381385
}
382386

@@ -407,8 +411,8 @@ public function install()
407411

408412
// run install script
409413
$this->_shell->execute(
410-
'php -f %s install ' . implode(' ', array_keys($installParams)),
411-
array_merge([BP . '/setup/index.php'], array_values($installParams))
414+
'php -f %s setup:install ' . implode(' ', array_keys($installParams)),
415+
array_merge([BP . '/bin/magento'], array_values($installParams))
412416
);
413417

414418
// enable only specified list of caches

dev/tests/integration/framework/Magento/TestFramework/ObjectManager/Configurator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public function getConfiguration()
1616
{
1717
return [
1818
'preferences' => [
19-
'Magento\Framework\Stdlib\Cookie' => 'Magento\TestFramework\Cookie',
2019
'Magento\Framework\Stdlib\CookieManagerInterface' => 'Magento\TestFramework\CookieManager',
2120
]
2221
];

dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ protected function _loadPrimaryConfig(DirectoryList $directoryList, $driverPool,
9595
'Magento\Framework\Stdlib\CookieManagerInterface' => 'Magento\TestFramework\CookieManager',
9696
'Magento\Framework\ObjectManager\DynamicConfigInterface' =>
9797
'\Magento\TestFramework\ObjectManager\Configurator',
98-
'Magento\Framework\Stdlib\Cookie' => 'Magento\TestFramework\Cookie',
9998
'Magento\Framework\App\RequestInterface' => 'Magento\TestFramework\Request',
10099
'Magento\Framework\App\Request\Http' => 'Magento\TestFramework\Request',
101100
'Magento\Framework\App\ResponseInterface' => 'Magento\TestFramework\Response',

0 commit comments

Comments
 (0)