Skip to content

Commit

Permalink
Fix tests for #13788 - Exporting a view structure
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Dec 21, 2018
1 parent a5b50b3 commit d327674
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions test/classes/Plugins/Export/ExportSqlTest.php
Expand Up @@ -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'
);
Expand Down Expand Up @@ -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'
);
Expand Down
4 changes: 3 additions & 1 deletion test/classes/TrackerTest.php
Expand Up @@ -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'
);
Expand Down

0 comments on commit d327674

Please sign in to comment.