Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2021-08-31 01:31:53 +0300
committerWilliam Desportes <williamdes@wdes.fr>2021-08-31 01:46:37 +0300
commit828d8e1de49efe12a01b73e2f95ffde5c95335f3 (patch)
tree2c680538dad39a63157a232d20c5d5fb4486c40c /test
parent2d307ed06285528375be24eb1b6dc43006a5259d (diff)
parentbd78d5ff0611910d89ed842120b4685eeef71139 (diff)
Merge branch 'QA_5_1'
Also fixed tests from previous merge: 2d307ed06285528375be24eb1b6dc43006a5259d Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'test')
-rw-r--r--test/classes/DatabaseInterfaceTest.php3
-rw-r--r--test/classes/RelationTest.php7
2 files changed, 9 insertions, 1 deletions
diff --git a/test/classes/DatabaseInterfaceTest.php b/test/classes/DatabaseInterfaceTest.php
index f08704d76d..ba5976d456 100644
--- a/test/classes/DatabaseInterfaceTest.php
+++ b/test/classes/DatabaseInterfaceTest.php
@@ -836,6 +836,8 @@ class DatabaseInterfaceTest extends AbstractTestCase
['NULL']
);
+ $this->dummyDbi->addSelectDb('PMA-storage');
+
$this->dbi->initRelationParamsCache();
$this->assertArrayHasKey(
@@ -846,6 +848,7 @@ class DatabaseInterfaceTest extends AbstractTestCase
);
$this->assertAllQueriesConsumed();
+ $this->assertAllSelectsConsumed();
$this->dummyDbi->addResult(
'SHOW TABLES FROM `PMA-storage`',
diff --git a/test/classes/RelationTest.php b/test/classes/RelationTest.php
index e56ca5d6ff..da58abfba4 100644
--- a/test/classes/RelationTest.php
+++ b/test/classes/RelationTest.php
@@ -1001,13 +1001,15 @@ class RelationTest extends AbstractTestCase
$this->assertArrayHasKey('relation', $_SESSION, 'The cache is expected to be filled');
$this->assertSame([], $_SESSION['relation']);
+ $this->dummyDbi->addSelectDb('db_pma');
+ $this->dummyDbi->addSelectDb('db_pma');
$this->relation->fixPmaTables('db_pma', true);
$this->assertArrayNotHasKey('message', $GLOBALS);
$this->assertArrayHasKey('relation', $_SESSION, 'The cache is expected to be filled');
$this->assertSame('db_pma', $GLOBALS['cfg']['Server']['pmadb']);
$this->assertSame([
- 'PMA_VERSION' => $_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'],
+ 'version' => $_SESSION['relation'][$GLOBALS['server']]['version'],
'relwork' => false,
'displaywork' => false,
'bookmarkwork' => false,
@@ -1033,6 +1035,7 @@ class RelationTest extends AbstractTestCase
], $_SESSION['relation'][$GLOBALS['server']]);
$this->assertAllQueriesConsumed();
+ $this->assertAllSelectsConsumed();
}
public function testFixPmaTablesNormalFixTablesFails(): void
@@ -1126,6 +1129,7 @@ class RelationTest extends AbstractTestCase
'SHOW TABLES FROM `phpmyadmin`',
[]
);
+ $this->dummyDbi->addSelectDb('phpmyadmin');
$this->assertArrayNotHasKey('errno', $GLOBALS);
@@ -1137,6 +1141,7 @@ class RelationTest extends AbstractTestCase
$this->assertAllQueriesConsumed();
$this->assertAllErrorCodesConsumed();
+ $this->assertAllSelectsConsumed();
}
public function testCreatePmaDatabaseFailsError1044(): void