Skip to content

Commit

Permalink
Various coding style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Sep 18, 2012
1 parent 4653049 commit 3572e79
Showing 1 changed file with 74 additions and 2 deletions.
76 changes: 74 additions & 2 deletions test/classes/PMA_DisplayResults_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*
* @package PhpMyAdmin-test
*/
class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
{
/**
* @access protected
Expand All @@ -37,7 +37,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new PMA_DisplayResults('as', '','','');
$this->object = new PMA_DisplayResults('as', '', '', '');
$GLOBALS['PMA_Config'] = new PMA_Config();
$GLOBALS['PMA_Config']->enableBc();
$SESSION[' PMA_Token '] = 'token';
Expand Down Expand Up @@ -86,6 +86,8 @@ private function _callPrivateFunction($name, $params)
* elsecomputed inside this function)
* @param string $output output from the _setDisplayMode method
*
* @return void
*
* @dataProvider providerForTestSetDisplayModeCase1
*/
public function testSetDisplayModeCase1($the_disp_mode, $the_total, $output)
Expand Down Expand Up @@ -165,6 +167,8 @@ public function providerForTestSetDisplayModeCase1()
* elsecomputed inside this function)
* @param string $output output from the _setDisplayMode method
*
* @return void
*
* @dataProvider providerForTestSetDisplayModeCase2
*/
public function testSetDisplayModeCase2($the_disp_mode, $the_total, $output)
Expand Down Expand Up @@ -246,6 +250,8 @@ public function providerForTestSetDisplayModeCase2()
* elsecomputed inside this function)
* @param string $output output from the _setDisplayMode method
*
* @return void
*
* @dataProvider providerForTestSetDisplayModeCase3
*/
public function testSetDisplayModeCase3($the_disp_mode, $the_total, $output)
Expand Down Expand Up @@ -315,6 +321,8 @@ public function providerForTestSetDisplayModeCase3()

/**
* Test for _isSelect function
*
* @return void
*/
public function testisSelect()
{
Expand All @@ -332,13 +340,17 @@ public function testisSelect()
}

/**
* Test for navigation buttons
*
* @param string $caption iconic caption for button
* @param string $title text for button
* @param integer $pos position for next query
* @param string $html_sql_query query ready for display
* @param string $output output from the _getTableNavigationButton
* method
*
* @return void
*
* @dataProvider providerForTestGetTableNavigationButton
*/
public function testGetTableNavigationButton(
Expand Down Expand Up @@ -386,13 +398,17 @@ public function providerForTestGetTableNavigationButton()
}

/**
* Test for table navigation
*
* @param integer $pos_next the offset for the "next" page
* @param integer $pos_prev the offset for the "previous" page
* @param string $id_for_direction_dropdown the id for the direction dropdown
* @param boolean $is_innodb the table type is innoDb or not
* @param string $output output from the _getTableNavigation
* method
*
* @return void
*
* @dataProvider providerForTestGetTableNavigation
*/
public function testGetTableNavigation(
Expand Down Expand Up @@ -423,6 +439,8 @@ public function testGetTableNavigation(
}

/**
* Provider for testing table navigation
*
* @return array data for testGetTableNavigation
*/
public function providerForTestGetTableNavigation()
Expand Down Expand Up @@ -469,6 +487,8 @@ public function dataProviderForTestGetResettedClassForInlineEdit()
* @param integer $row_no the row index
* @param string $output output of__getResettedClassForInlineEdit
*
* @return void
*
* @dataProvider dataProviderForTestGetResettedClassForInlineEdit
*/
public function testGetResettedClassForInlineEdit(
Expand All @@ -495,6 +515,8 @@ public function testGetResettedClassForInlineEdit(

/**
* Test for _getClassForDateTimeRelatedFields - case 1
*
* @return void
*/
public function testGetClassForDateTimeRelatedFieldsCase1()
{
Expand All @@ -509,6 +531,8 @@ public function testGetClassForDateTimeRelatedFieldsCase1()

/**
* Test for _getClassForDateTimeRelatedFields - case 2
*
* @return void
*/
public function testGetClassForDateTimeRelatedFieldsCase2()
{
Expand All @@ -523,6 +547,8 @@ public function testGetClassForDateTimeRelatedFieldsCase2()

/**
* Test for _getClassForDateTimeRelatedFields - case 3
*
* @return void
*/
public function testGetClassForDateTimeRelatedFieldsCase3()
{
Expand Down Expand Up @@ -558,6 +584,8 @@ public function dataProviderForTestGetOperationLinksForVerticleTableCase1()
* @param string $operation edit/copy/delete
* @param string $output output of _getOperationLinksForVerticleTable
*
* @return void
*
* @dataProvider dataProviderForTestGetOperationLinksForVerticleTableCase1
*/
public function testGetOperationLinksForVerticleTableCase1(
Expand Down Expand Up @@ -612,6 +640,8 @@ public function dataProviderForTestGetOperationLinksForVerticleTableCase2()
* @param string $operation edit/copy/delete
* @param string $output output of _getOperationLinksForVerticleTable
*
* @return void
*
* @dataProvider dataProviderForTestGetOperationLinksForVerticleTableCase2
*/
public function testGetOperationLinksForVerticleTableCase2(
Expand Down Expand Up @@ -667,6 +697,8 @@ public function dataProviderForTestGetOperationLinksForVerticleTableCase3()
* @param string $operation edit/copy/delete
* @param string $output output of _getOperationLinksForVerticleTable
*
* @return void
*
* @dataProvider dataProviderForTestGetOperationLinksForVerticleTableCase3
*/
public function testGetOperationLinksForVerticleTableCase3(
Expand Down Expand Up @@ -719,6 +751,8 @@ public function dataProviderForGetCheckBoxesForMultipleRowOperations()
* @param string $dir _left / _right
* @param string $output output of _getCheckBoxesForMultipleRowOperations
*
* @return void
*
* @dataProvider dataProviderForGetCheckBoxesForMultipleRowOperations
*/
public function testGetCheckBoxesForMultipleRowOperations(
Expand Down Expand Up @@ -746,6 +780,8 @@ public function testGetCheckBoxesForMultipleRowOperations(

/**
* Test for _getOffsets - case 1
*
* @return void
*/
public function testGetOffsetsCase1()
{
Expand All @@ -758,6 +794,8 @@ public function testGetOffsetsCase1()

/**
* Test for _getOffsets - case 2
*
* @return void
*/
public function testGetOffsetsCase2()
{
Expand Down Expand Up @@ -787,6 +825,8 @@ public function dataProviderForGetSortParamsCase1()
* @param string $order_by_clause the order by clause of the sql query
* @param string $output output of _getSortParams
*
* @return void
*
* @dataProvider dataProviderForGetSortParamsCase1
*/
public function testGetSortParamsCase1($order_by_clause, $output)
Expand Down Expand Up @@ -824,6 +864,8 @@ public function dataProviderForGetSortParamsCase2()
* @param string $order_by_clause the order by clause of the sql query
* @param string $output output of _getSortParams
*
* @return void
*
* @dataProvider dataProviderForGetSortParamsCase2
*/
public function testGetSortParamsCase2($order_by_clause, $output)
Expand Down Expand Up @@ -881,6 +923,8 @@ public function dataProviderForGetCheckboxForMultiRowSubmissions()
* @param string $class css classes for the td element
* @param string $output output of _getCheckboxForMultiRowSubmissions
*
* @return void
*
* @dataProvider dataProviderForGetCheckboxForMultiRowSubmissions
*/
public function testGetCheckboxForMultiRowSubmissions(
Expand Down Expand Up @@ -930,6 +974,8 @@ public function dataProviderForGetEditLink()
* @param string $where_clause_html url encoded where clause
* @param string $output output of _getEditLink
*
* @return void
*
* @dataProvider dataProviderForGetEditLink
*/
public function testGetEditLink(
Expand Down Expand Up @@ -982,6 +1028,8 @@ public function dataProviderForGetCopyLink()
* @param string $class css classes for the td element
* @param string $output output of _getCopyLink
*
* @return void
*
* @dataProvider dataProviderForGetCopyLink
*/
public function testGetCopyLink(
Expand Down Expand Up @@ -1031,6 +1079,8 @@ public function dataProviderForGetDeleteLink()
* @param string $class css classes for the td element
* @param string $output output of _getDeleteLink
*
* @return void
*
* @dataProvider dataProviderForGetDeleteLink
*/
public function testGetDeleteLink(
Expand Down Expand Up @@ -1120,6 +1170,8 @@ public function dataProviderForGetCheckboxAndLinksCase1()
* @param string $js_conf text for the JS confirmation
* @param string $output output of _getCheckboxAndLinks
*
* @return void
*
* @dataProvider dataProviderForGetCheckboxAndLinksCase1
*/
public function testGetCheckboxAndLinksCase1(
Expand Down Expand Up @@ -1211,6 +1263,8 @@ public function dataProviderForGetCheckboxAndLinksCase2()
* @param string $js_conf text for the JS confirmation
* @param string $output output of _getCheckboxAndLinks
*
* @return void
*
* @dataProvider dataProviderForGetCheckboxAndLinksCase2
*/
public function testGetCheckboxAndLinksCase2(
Expand Down Expand Up @@ -1296,6 +1350,8 @@ public function dataProviderForGetCheckboxAndLinksCase3()
* @param string $js_conf text for the JS confirmation
* @param string $output output of _getCheckboxAndLinks
*
* @return void
*
* @dataProvider dataProviderForGetCheckboxAndLinksCase3
*/
public function testGetCheckboxAndLinksCase3(
Expand All @@ -1320,6 +1376,8 @@ public function testGetCheckboxAndLinksCase3(

/**
* Test for _mimeDefaultFunction
*
* @return void
*/
public function testMimeDefaultFunction()
{
Expand Down Expand Up @@ -1394,6 +1452,8 @@ public function dataProviderForGetPlacedLinks()
* @param string $js_conf text for the JS confirmation
* @param string $output output of _getPlacedLinks
*
* @return void
*
* @dataProvider dataProviderForGetPlacedLinks
*/
public function testGetPlacedLinks(
Expand Down Expand Up @@ -1471,6 +1531,8 @@ public function dataProviderForTestIsNeedToSyntaxHighlight()
* @param string $field the field name
* @param boolean $output output of _isNeedToSyntaxHighlight
*
* @return void
*
* @dataProvider dataProviderForTestIsNeedToSyntaxHighlight
*/
public function testIsNeedToSyntaxHighlight($db, $table, $data, $field, $output)
Expand Down Expand Up @@ -1523,6 +1585,8 @@ public function dataProviderForTestIsFieldNeedToLink()
* @param string $field the field name
* @param boolean $output output of _isFieldNeedToLink
*
* @return void
*
* @dataProvider dataProviderForTestIsFieldNeedToLink
*/
public function testIsFieldNeedToLink($db, $table, $field, $output)
Expand Down Expand Up @@ -1611,6 +1675,8 @@ public function dataProviderForTestGetSpecialLinkUrl()
* @param string $field_name column name
* @param boolean $output output of _getSpecialLinkUrl
*
* @return void
*
* @dataProvider dataProviderForTestGetSpecialLinkUrl
*/
public function testGetSpecialLinkUrl(
Expand Down Expand Up @@ -1723,6 +1789,8 @@ public function dataProviderForTestGetRowInfoForSpecialLinks()
* @param array $col_order the column order
* @param boolean $output output of _getRowInfoForSpecialLinks
*
* @return void
*
* @dataProvider dataProviderForTestGetRowInfoForSpecialLinks
*/
public function testGetRowInfoForSpecialLinks(
Expand Down Expand Up @@ -1772,6 +1840,8 @@ public function dataProviderForTestGetShowAllButtonForTableNavigation()
* @param string $html_sql_query the sql encoded by html special characters
* @param string $output output of _getRowInfoForSpecialLinks
*
* @return void
*
* @dataProvider dataProviderForTestGetShowAllButtonForTableNavigation
*/
public function testGetShowAllButtonForTableNavigation(
Expand Down Expand Up @@ -1830,6 +1900,8 @@ public function dataProviderForTestSetHighlightedColumnGlobalField()
* @param array $analyzed_sql the analyzed query
* @param array $output setting value of _setHighlightedColumnGlobalField
*
* @return void
*
* @dataProvider dataProviderForTestSetHighlightedColumnGlobalField
*/
public function testSetHighlightedColumnGlobalField($analyzed_sql, $output)
Expand Down

0 comments on commit 3572e79

Please sign in to comment.