From d327674d728d6dea5abe157eb91b5d057de40bfd Mon Sep 17 00:00:00 2001 From: William Desportes Date: Fri, 21 Dec 2018 09:46:11 +0100 Subject: [PATCH] Fix tests for #13788 - Exporting a view structure Signed-off-by: William Desportes --- test/classes/Plugins/Export/ExportSqlTest.php | 8 ++++++-- test/classes/TrackerTest.php | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/classes/Plugins/Export/ExportSqlTest.php b/test/classes/Plugins/Export/ExportSqlTest.php index 2a6ee2d6fcb1..937fa0b0866d 100644 --- a/test/classes/Plugins/Export/ExportSqlTest.php +++ b/test/classes/Plugins/Export/ExportSqlTest.php @@ -965,13 +965,15 @@ public function testGetTableDef() ->with('res') ->will($this->returnValue($tmpres)); - $dbi->expects($this->exactly(2)) + $dbi->expects($this->exactly(3)) ->method('tryQuery') ->withConsecutive( array("SHOW TABLE STATUS FROM `db` WHERE Name = 'table'"), + array('USE `db`'), array('SHOW CREATE TABLE `db`.`table`') ) ->willReturnOnConsecutiveCalls( + 'res', 'res', 'res' ); @@ -1139,13 +1141,15 @@ public function testGetTableDefWithError() ->with('res') ->will($this->returnValue($tmpres)); - $dbi->expects($this->exactly(2)) + $dbi->expects($this->exactly(3)) ->method('tryQuery') ->withConsecutive( array("SHOW TABLE STATUS FROM `db` WHERE Name = 'table'"), + array('USE `db`'), array('SHOW CREATE TABLE `db`.`table`') ) ->willReturnOnConsecutiveCalls( + 'res', 'res', 'res' ); diff --git a/test/classes/TrackerTest.php b/test/classes/TrackerTest.php index a658f1955700..f46fc8f55fe0 100644 --- a/test/classes/TrackerTest.php +++ b/test/classes/TrackerTest.php @@ -254,13 +254,15 @@ public function testCreateVersion() 'Update_time' => '2013-02-22 21:46:48' ) ); - $dbi->expects($this->exactly(2)) + $dbi->expects($this->exactly(3)) ->method('tryQuery') ->withConsecutive( array("SHOW TABLE STATUS FROM `pma_test` WHERE Name = 'pma_tbl'"), + array('USE `pma_test`'), array('SHOW CREATE TABLE `pma_test`.`pma_tbl`') ) ->willReturnOnConsecutiveCalls( + 'res', 'res', 'res' );