diff --git a/test/classes/controllers/TableSearchControllerTest.php b/test/classes/controllers/TableSearchControllerTest.php index 355d98c109..390b93e488 100644 --- a/test/classes/controllers/TableSearchControllerTest.php +++ b/test/classes/controllers/TableSearchControllerTest.php @@ -85,6 +85,8 @@ class TableSearchControllerTest extends PMATestCase $dbi->expects($this->any())->method('fetchValue') ->will($this->returnValue($show_create_table)); + $dbi->expects($this->any())->method('escapeString') + ->will($this->returnArgument(0)); $GLOBALS['dbi'] = $dbi; diff --git a/test/classes/navigation/NavigationTest.php b/test/classes/navigation/NavigationTest.php index aef668e822..72a11090e9 100644 --- a/test/classes/navigation/NavigationTest.php +++ b/test/classes/navigation/NavigationTest.php @@ -72,6 +72,9 @@ class NavigationTest extends PMATestCase $dbi->expects($this->once()) ->method('tryQuery') ->with($expectedQuery); + $dbi->expects($this->any())->method('escapeString') + ->will($this->returnArgument(0)); + $GLOBALS['dbi'] = $dbi; $this->object->hideNavigationItem('itemName', 'itemType', 'db'); } @@ -93,6 +96,9 @@ class NavigationTest extends PMATestCase $dbi->expects($this->once()) ->method('tryQuery') ->with($expectedQuery); + + $dbi->expects($this->any())->method('escapeString') + ->will($this->returnArgument(0)); $GLOBALS['dbi'] = $dbi; $this->object->unhideNavigationItem('itemName', 'itemType', 'db'); } @@ -111,6 +117,8 @@ class NavigationTest extends PMATestCase $dbi = $this->getMockBuilder('PMA\libraries\DatabaseInterface') ->disableOriginalConstructor() ->getMock(); + $dbi->expects($this->any())->method('escapeString') + ->will($this->returnArgument(0)); $dbi->expects($this->once()) ->method('tryQuery') ->with($expectedQuery) @@ -140,6 +148,7 @@ class NavigationTest extends PMATestCase ->will($this->returnValue(false)); $dbi->expects($this->once()) ->method('freeResult'); + $GLOBALS['dbi'] = $dbi; $html = $this->object->getItemUnhideDialog('db');