Skip to content

Commit

Permalink
Remove more trailing white spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
madhuracj committed Nov 4, 2013
1 parent f1a461d commit 525fd79
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 64 deletions.
4 changes: 2 additions & 2 deletions test/libraries/PMA_Form_Processing_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PMA_From_Processing_Test extends PHPUnit_Framework_TestCase

/**
* Test for process_formset()
*
*
* @return void
*/
public function testProcessFormSet()
Expand Down Expand Up @@ -116,7 +116,7 @@ public function testProcessFormSet()
);

}


}
?>
8 changes: 4 additions & 4 deletions test/libraries/PMA_SQL_parse_analyze_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function testPMA_SQP_getParserAnalyzeMa()
$sql_query = "select * from PMA.PMAParse";
$db = "PMA";
$data = PMA_SQP_getParserAnalyzeMap($sql_query, $db);

$this->assertEquals(
array(
'type' => 'alpha_reservedWord',
Expand All @@ -50,12 +50,12 @@ public function testPMA_SQP_getParserAnalyzeMa()
$this->assertTrue($data['is_select']);
$this->assertFalse($data['is_group']);
$this->assertFalse($data['is_show']);

//update statement
$sql_query = "UPDATE `11`.`pma_bookmark` SET `id` = '2' WHERE `pma_bookmark`.`id` = 1;";
$db = "PMA";
$data = PMA_SQP_getParserAnalyzeMap($sql_query, $db);

$this->assertEquals(
array(
'type' => 'alpha_reservedWord',
Expand All @@ -72,7 +72,7 @@ public function testPMA_SQP_getParserAnalyzeMa()
$this->assertFalse($data['is_group']);
$this->assertFalse($data['is_show']);
$this->assertTrue($data['is_affected']);
$this->assertFalse($data['is_select']);
$this->assertFalse($data['is_select']);
}
}

Expand Down
20 changes: 10 additions & 10 deletions test/libraries/PMA_SQL_parser_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public function testPMA_SQP_isKeyWord()
$this->assertTrue(PMA_SQP_isKeyWord("accessible"));
$this->assertTrue(PMA_SQP_isKeyWord("ASC"));
$this->assertFalse(PMA_SQP_isKeyWord("hello"));
}
}

/**
* Test PMA_SQP_typeCheck
*
Expand All @@ -85,20 +85,20 @@ public function testPMA_SQP_typeCheck()
$this->assertTrue(
PMA_SQP_typeCheck("VARCHAR", "VARCHAR")
);

$this->assertFalse(
PMA_SQP_typeCheck("VARCHAR", "VARCHAR_INT")
);

$this->assertTrue(
PMA_SQP_typeCheck("VARCHAR_INT", "VARCHAR")
);

$this->assertFalse(
PMA_SQP_typeCheck("TIME_INT", "VARCHAR")
);
}

/**
* Test PMA_SQP_throwError
*
Expand All @@ -110,23 +110,23 @@ public function testPMA_SQP_throwError()
$message = "error from testPMA_SQP_throwError";
$sql = "select * from PMA.PMABookmark";
PMA_SQP_throwError($message, $sql);

$this->assertContains(
"There seems to be an error in your SQL query.",
$SQP_errorString
);

$this->assertContains(
'ERROR: ' . $message,
$SQP_errorString
);

$this->assertContains(
'SQL: ' . htmlspecialchars($sql),
$SQP_errorString
);
}

/**
* Data provider for parser testing
*
Expand Down
10 changes: 5 additions & 5 deletions test/libraries/PMA_SQL_validator_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Include to test.
*/
define('PMA_MYSQL_STR_VERSION', "5.00.15");
//it will be used before setup on libraries/sqlvalidator.lib.php
//it will be used before setup on libraries/sqlvalidator.lib.php
global $cfg;
$cfg['SQLValidator']['use'] = false;

Expand Down Expand Up @@ -54,10 +54,10 @@ public function testPMA_validateSQL_NoConfigure()
'',
PMA_validateSQL($sql)
);

//$cfg['SQLValidator']['use'] = true
$GLOBALS['cfg']['SQLValidator']['use'] = true;

//the sql validatior is not loaded
$GLOBALS['sqlvalidator_error'] = true;
$this->assertContains(
Expand All @@ -81,7 +81,7 @@ public function testPMA_validateSQL_SOAP()
$GLOBALS['cfg']['SQLValidator']['use'] = true;
$GLOBALS['sqlvalidator_soap'] = 'PEAR';
$GLOBALS['sqlvalidator_error'] = false;

//validate that the result is the same as SOAP_Client return
//SOAP_Client is mocked with simple logic
$this->assertTrue(
Expand Down Expand Up @@ -132,7 +132,7 @@ class Session
var $target = null;
var $username = null;
var $password = null;
var $calling_program = null;
var $calling_program = null;
var $sessionId = null;
var $sessionKey = null;
var $data = null;
Expand Down
10 changes: 5 additions & 5 deletions test/libraries/PMA_config_functions_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ public function testPMALang()
$this->assertEquals(
"1988-08-01",
PMA_lang("%04d-%02d-%02d", "1988", "8", "1")
);
);
}

/**
* Test for PMA_langName
*
*
* @return void
* @test
*/
public function testLangName()
{
{
$canonicalPath = "Servers/1/2test";

$this->assertEquals(
Expand All @@ -65,14 +65,14 @@ public function testLangName()
);

$GLOBALS["strConfigServers_2test_name"] = "<a>msg</a>";

$this->assertEquals(
"<a>msg</a>",
PMA_langName($canonicalPath)
);

$GLOBALS["strConfigServers_2test_desc"] = "<a>msg</a>";

$this->assertEquals(
"&lt;a&gt;msg&lt;/a&gt;",
PMA_langName($canonicalPath, "desc")
Expand Down
4 changes: 2 additions & 2 deletions test/libraries/PMA_ip_allow_deny_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public function testPMA_getIp()
"101.0.0.25",
PMA_getIp()
);

//proxy
$var_name = "direct_ip";
$direct_ip = $_SERVER['REMOTE_ADDR'];
$GLOBALS['cfg']['TrustedProxies'][$direct_ip] = $var_name;
$GLOBALS['cfg']['TrustedProxies'][$direct_ip] = $var_name;
$_SERVER[$var_name] = "192.168.0.1";
$this->assertEquals(
"192.168.0.1",
Expand Down
2 changes: 1 addition & 1 deletion test/libraries/PMA_relation_cleanup_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function testPMARelationsCleanupColumn()
array('db_name0' => 'comment0','db_name1' => 'comment1'),
$db_comments
);

$this->assertEquals(
true,
$cfgRelation['displaywork']
Expand Down
44 changes: 22 additions & 22 deletions test/libraries/PMA_relation_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public function testPMAQueryAsControlUser()
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')
->disableOriginalConstructor()
->getMock();

$dbi->expects($this->once())
->method('query')
->will($this->returnValue('executeResult1'));

$dbi->expects($this->once())
->method('tryQuery')
->will($this->returnValue('executeResult2'));
Expand Down Expand Up @@ -113,16 +113,16 @@ public function testPMAGetRelationsParam()
'<strong>OK</strong>',
$retval
);

//$cfg['Servers'][$i]['relation']
$result = "\$cfg['Servers'][\$i]['pmadb'] ... </th><td class=\"right\">"
$result = "\$cfg['Servers'][\$i]['pmadb'] ... </th><td class=\"right\">"
. "<font color=\"green\"><strong>OK</strong></font>";
$this->assertContains(
$result,
$retval
);
// $cfg['Servers'][$i]['relation']
$result = "\$cfg['Servers'][\$i]['relation'] ... </th><td class=\"right\">"
$result = "\$cfg['Servers'][\$i]['relation'] ... </th><td class=\"right\">"
. "<font color=\"red\"><strong>not OK</strong></font>";
$this->assertContains(
$result,
Expand All @@ -134,8 +134,8 @@ public function testPMAGetRelationsParam()
$result,
$retval
);
// $cfg['Servers'][$i]['table_info']
$result = "\$cfg['Servers'][\$i]['table_info'] ... </th>"
// $cfg['Servers'][$i]['table_info']
$result = "\$cfg['Servers'][\$i]['table_info'] ... </th>"
. "<td class=\"right\">"
. "<font color=\"red\"><strong>not OK</strong></font>";
$this->assertContains(
Expand All @@ -148,7 +148,7 @@ public function testPMAGetRelationsParam()
$result,
$retval
);

//$GLOBALS['cfg']['Server']['pmadb']==false
$value = $GLOBALS['cfg']['Server']['pmadb'];
$GLOBALS['cfg']['Server']['pmadb'] = false;
Expand All @@ -169,9 +169,9 @@ public function testPMAGetRelationsParam()
$result,
$retval
);

$GLOBALS['cfg']['Server']['pmadb'] = $value;

}

/**
Expand All @@ -180,28 +180,28 @@ public function testPMAGetRelationsParam()
* @return void
*/
public function testPMAGetDisplayField()
{
{
$db = 'information_schema';
$table = 'CHARACTER_SETS';
$this->assertEquals(
'DESCRIPTION',
PMA_getDisplayField($db, $table)
);
);

$db = 'information_schema';
$table = 'TABLES';
$this->assertEquals(
'TABLE_COMMENT',
PMA_getDisplayField($db, $table)
);

$db = 'information_schema';
$table = 'PMA';
$this->assertEquals(
false,
PMA_getDisplayField($db, $table)
);

}

/**
Expand All @@ -213,11 +213,11 @@ public function testPMAGetComments()
{
$GLOBALS['cfg']['ServerDefault'] = 0;
$_SESSION['relation'] = array();

$dbi = $this->getMockBuilder('PMA_DatabaseInterface')
->disableOriginalConstructor()
->getMock();

$getColumnsResult = array(
array(
'Field' => 'field1',
Expand All @@ -232,15 +232,15 @@ public function testPMAGetComments()
);
$dbi->expects($this->any())->method('getColumns')
->will($this->returnValue($getColumnsResult));

$GLOBALS['dbi'] = $dbi;

$db = 'information_schema';
$this->assertEquals(
array(''),
PMA_getComments($db)
);
);

$db = 'information_schema';
$table = 'TABLES';
$this->assertEquals(
Expand All @@ -249,7 +249,7 @@ public function testPMAGetComments()
'field2' => 'Comment1'
),
PMA_getComments($db, $table)
);
);
}
}

10 changes: 5 additions & 5 deletions test/libraries/PMA_select_server_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function testPMASelectServer()
//$not_only_options=false & $ommit_fieldset=false
$html = PMA_selectServer($not_only_options, $ommit_fieldset);
$server = $GLOBALS['cfg']['Servers']['0'];

//server items
$this->assertContains(
$server['host'],
Expand All @@ -116,19 +116,19 @@ public function testPMASelectServer()

//$not_only_options=true & $ommit_fieldset=true
$html = PMA_selectServer($not_only_options, $ommit_fieldset);

//$GLOBALS['cfg']['DefaultTabServer']
$this->assertContains(
$GLOBALS['cfg']['DefaultTabServer'],
$html
);

//PMA_URL_getHiddenInputs
$this->assertContains(
PMA_URL_getHiddenInputs(),
$html
);

//labels
$this->assertContains(
__('Current Server:'),
Expand All @@ -138,7 +138,7 @@ public function testPMASelectServer()
'(' . __('Servers') . ')',
$html
);

//server items
$server = $GLOBALS['cfg']['Servers']['0'];
$this->assertContains(
Expand Down
Loading

0 comments on commit 525fd79

Please sign in to comment.