Improve method name

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2023-04-02 23:50:46 +01:00
parent cd9ca8419a
commit 9fcafd2504
2 changed files with 5 additions and 4 deletions

View File

@ -1456,7 +1456,7 @@ class Relation
*
* @return array<string, string> table name, create query
*/
public function getDefaultPmaTableNames(array $tableNameReplacements): array
public function getCreateTableSqlQueries(array $tableNameReplacements): array
{
$pmaTables = [];
$createTablesFile = (string) file_get_contents(SQL_DIR . 'create_tables.sql');
@ -1555,7 +1555,7 @@ class Relation
$createQueries = [];
if ($create) {
$createQueries = $this->getDefaultPmaTableNames($tableNameReplacements);
$createQueries = $this->getCreateTableSqlQueries($tableNameReplacements);
if (! $this->dbi->selectDb($db, Connection::TYPE_CONTROL)) {
$GLOBALS['message'] = $this->dbi->getError(Connection::TYPE_CONTROL);
@ -1590,6 +1590,7 @@ class Relation
continue;
}
// Fill it with the default table name
$GLOBALS['cfg']['Server'][$feature] = $table;
}

View File

@ -1376,7 +1376,7 @@ class RelationTest extends AbstractTestCase
$this->assertSame(
$data,
$relation->getDefaultPmaTableNames([]),
$relation->getCreateTableSqlQueries([]),
);
$data['pma__export_templates'] = implode("\n", [
@ -1403,7 +1403,7 @@ class RelationTest extends AbstractTestCase
$this->assertSame(
$data,
$relation->getDefaultPmaTableNames(['pma__export_templates' => 'db_exporttemplates_pma']),
$relation->getCreateTableSqlQueries(['pma__export_templates' => 'db_exporttemplates_pma']),
);
}