Fixed small error in XML test

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
This commit is contained in:
Deven Bansod 2016-11-04 19:35:48 +05:30
parent 02dcfc8198
commit 8b6e102cf7
2 changed files with 17 additions and 20 deletions

View File

@ -27,9 +27,9 @@
<directory suffix="_test.php">test/libraries/rte</directory>
<directory suffix="_test.php">test/libraries</directory>
</testsuite>
<testsuite name="Selenium">
<!-- <testsuite name="Selenium">
<directory suffix="Test.php">test/selenium</directory>
</testsuite>
</testsuite> -->
</testsuites>
<logging>

View File

@ -327,36 +327,33 @@ class ExportXmlTest extends PMATestCase
unset($GLOBALS['xml_export_procedures']);
$GLOBALS['output_charset_conversion'] = 0;
$result = array(
$dbi = $this->getMockBuilder('PMA\libraries\DatabaseInterface')
->disableOriginalConstructor()
->getMock();
$result_1 = array(
array(
'DEFAULT_COLLATION_NAME' => 'utf8_general_ci',
'DEFAULT_CHARACTER_SET_NAME' => 'utf-8',
)
);
$dbi = $this->getMockBuilder('PMA\libraries\DatabaseInterface')
->disableOriginalConstructor()
->getMock();
$dbi->expects($this->at(0))
->method('fetchResult')
->with(
'SELECT `DEFAULT_CHARACTER_SET_NAME`, `DEFAULT_COLLATION_NAME`'
. ' FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME`'
. ' = \'d<"b\' LIMIT 1'
)
->will($this->returnValue($result));
$result = array(
$result_2 = array(
't1' => array(null, '"tbl"')
);
$dbi->expects($this->exactly(4))
$result_3 = array(
't2' => array(null, '"tbl"')
);
$dbi->expects($this->exactly(5))
->method('fetchResult')
->willReturnOnConsecutiveCalls(
$result,
$result_1,
$result_2,
true,
$result,
$result_3,
false
);