Fix failing test

This commit is contained in:
Madhura Jayaratne 2013-08-27 22:07:23 +05:30
parent fa2a226585
commit 23dee32a29
2 changed files with 6 additions and 8 deletions

View File

@ -2426,9 +2426,7 @@ function PMA_verifyWhetherValueCanBeTruncatedAndAppendExtraData(
. PMA_Util::backquote($table)
. ' WHERE ' . $_REQUEST['where_clause'][0];
$result = $GLOBALS['dbi']->tryQuery(
$sql_for_real_value, 0, PMA_DatabaseInterface::QUERY_STORE, false
);
$result = $GLOBALS['dbi']->tryQuery($sql_for_real_value);
$fields_meta = $GLOBALS['dbi']->getFieldsMeta($result);
$meta = $fields_meta[0];
$new_value = $GLOBALS['dbi']->fetchValue($result);

View File

@ -2547,17 +2547,17 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase
->getMock();
$dbi->expects($this->at(0))
->method('fetchValue')
->method('tryQuery')
->with('SELECT `table`.`a` FROM `db`.`table` WHERE 1')
->will($this->returnValue(false));
$dbi->expects($this->at(1))
->method('fetchValue')
$dbi->expects($this->at(3))
->method('tryQuery')
->with('SELECT `table`.`a` FROM `db`.`table` WHERE 1')
->will($this->returnValue('123'));
$dbi->expects($this->at(2))
->method('fetchValue')
$dbi->expects($this->at(6))
->method('tryQuery')
->with('SELECT `table`.`a` FROM `db`.`table` WHERE 1')
->will($this->returnValue('123'));