diff --git a/Documentation.html b/Documentation.html
index d23017b1b0..68db53f21d 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -100,6 +100,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
Currently phpMyAdmin can:
- browse and drop databases, tables, views, columns and indexes
+ - display multiple results sets through stored procedures or queries
- create, copy, drop, rename and alter databases, tables, columns and
indexes
- maintenance server, databases and tables, with proposals on server
diff --git a/libraries/CommonFunctions.class.php b/libraries/CommonFunctions.class.php
index 7e20eb4c78..0f824f658a 100644
--- a/libraries/CommonFunctions.class.php
+++ b/libraries/CommonFunctions.class.php
@@ -5,7 +5,9 @@
*
* @package PhpMyAdmin
*/
-
+if (! defined('PHPMYADMIN')) {
+ exit;
+}
/**
* Misc functions used all over the scripts.
diff --git a/test/classes/PMA_DisplayResults_test.php b/test/classes/PMA_DisplayResults_test.php
index 29cc524881..079e6c45d4 100644
--- a/test/classes/PMA_DisplayResults_test.php
+++ b/test/classes/PMA_DisplayResults_test.php
@@ -1726,4 +1726,109 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
}
+ /**
+ * Data provider for testGetShowAllButtonForTableNavigation
+ *
+ * @return array parameters and output
+ */
+ public function dataProviderForTestGetShowAllButtonForTableNavigation()
+ {
+ return array(
+ array(
+ 'mysql',
+ 'user',
+ 'tbl_structure.php',
+ 'SELECT * FROM `user`',
+ '
+
| '
+ )
+ );
+ }
+
+
+ /**
+ * Test _getShowAllButtonForTableNavigation
+ *
+ * @param string $db the database name
+ * @param string $table the table name
+ * @param string $goto the URL to go back in case of errors
+ * @param string $html_sql_query the sql encoded by html special characters
+ * @param string $output output of _getRowInfoForSpecialLinks
+ *
+ * @dataProvider dataProviderForTestGetShowAllButtonForTableNavigation
+ */
+ public function testGetShowAllButtonForTableNavigation(
+ $db, $table, $goto, $html_sql_query, $output
+ ) {
+
+ $this->object->__set('_db', $db);
+ $this->object->__set('_table', $table);
+ $this->object->__set('_goto', $goto);
+
+ $this->assertEquals(
+ $output,
+ $this->_callPrivateFunction(
+ '_getShowAllButtonForTableNavigation',
+ array($html_sql_query)
+ )
+ );
+
+ }
+
+
+ /**
+ * Data provider for testSetHighlightedColumnGlobalField
+ *
+ * @return array parameters and output
+ */
+ public function dataProviderForTestSetHighlightedColumnGlobalField()
+ {
+ return array(
+ array(
+ array(),
+ array()
+ ),
+ array(
+ array(
+ 0 => array(
+ 'where_clause_identifiers' => array(
+ 0 => '`id`',
+ 1 => '`id`',
+ 2 => '`db_name`'
+ )
+ )
+ ),
+ array(
+ '`id`' => 'true',
+ '`db_name`' => 'true'
+ )
+ )
+ );
+ }
+
+
+ /**
+ * Test _setHighlightedColumnGlobalField
+ *
+ * @param array $analyzed_sql the analyzed query
+ * @param array $output setting value of _setHighlightedColumnGlobalField
+ *
+ * @dataProvider dataProviderForTestSetHighlightedColumnGlobalField
+ */
+ public function testSetHighlightedColumnGlobalField($analyzed_sql, $output)
+ {
+
+ $this->_callPrivateFunction(
+ '_setHighlightedColumnGlobalField',
+ array($analyzed_sql)
+ );
+
+ $this->assertEquals(
+ $output,
+ $this->object->__get('_highlight_columns')
+ );
+
+ }
+
+
}