Skip to content

Commit 1e56fe7

Browse files
committed
MAGETWO-92279: An incorrect result of declaration:generate:whitelist execution
- simplifying code
1 parent 1b93252 commit 1e56fe7

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

app/code/Magento/Developer/Console/Command/TablesWhitelistGenerateCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ private function filterPrimaryTables(array $moduleDbSchema)
197197
$primaryDbSchema = $this->getPrimaryDbSchema();
198198
if (isset($moduleDbSchema['table']) && isset($primaryDbSchema['table'])) {
199199
foreach ($primaryDbSchema['table'] as $tableNameKey => $tableContents) {
200-
if (isset($moduleDbSchema['table'][$tableNameKey])) {
201-
unset($moduleDbSchema['table'][$tableNameKey]);
202-
}
200+
unset($moduleDbSchema['table'][$tableNameKey]);
203201
}
204202
}
205203
return $moduleDbSchema;

dev/tests/setup-integration/testsuite/Magento/Developer/Console/Command/TablesWhitelistGenerateCommandTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ public function setUp()
6767
*/
6868
public function testExecute(array $expectedWhitelistContent)
6969
{
70-
$this->cliCommand->install(['Magento_TestSetupDeclarationModule1']);
71-
7270
$moduleName = 'Magento_TestSetupDeclarationModule1';
71+
$this->cliCommand->install([$moduleName]);
7372
$modulePath = $this->componentRegistrar->getPath('module', $moduleName);
7473
$whiteListFileName = $modulePath
7574
. DIRECTORY_SEPARATOR

0 commit comments

Comments
 (0)