diff --git a/test/classes/PMA_DBQbe_test.php b/test/classes/PMA_DBQbe_test.php
index 5139837180..c96b9752e6 100644
--- a/test/classes/PMA_DBQbe_test.php
+++ b/test/classes/PMA_DBQbe_test.php
@@ -98,14 +98,19 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for getCommonFunctions
*/
- public function testGetCommonFunctions(){
- $this->assertTrue($this->object->getCommonFunctions() instanceof PMA_CommonFunctions);
+ public function testGetCommonFunctions()
+ {
+ $this->assertInstanceOf(
+ 'PMA_CommonFunctions',
+ $this->object->getCommonFunctions()
+ );
}
/**
* Test for _getSortSelectCell
*/
- public function testGetSortSelectCell(){
+ public function testGetSortSelectCell()
+ {
$this->assertEquals(
'
',
$this->_callProtectedFunction(
@@ -118,7 +123,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getSortRow
*/
- public function testGetSortRow(){
+ public function testGetSortRow()
+ {
$this->assertEquals(
'
Sort:
',
$this->_callProtectedFunction(
@@ -131,7 +137,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getShowRow
*/
- public function testGetShowRow(){
+ public function testGetShowRow()
+ {
$this->assertEquals(
'
Show:
',
$this->_callProtectedFunction(
@@ -144,7 +151,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getCriteriaInputboxRow
*/
- public function testGetCriteriaInputboxRow(){
+ public function testGetCriteriaInputboxRow()
+ {
$this->assertEquals(
'
Criteria:
',
$this->_callProtectedFunction(
@@ -157,7 +165,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getFootersOptions
*/
- public function testGetFootersOptions(){
+ public function testGetFootersOptions()
+ {
$this->assertEquals(
'
Add/Delete criteria rows:
',
$this->_callProtectedFunction(
@@ -170,7 +179,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getTableFooters
*/
- public function testGetTableFooters(){
+ public function testGetTableFooters()
+ {
$this->assertEquals(
'',
$this->_callProtectedFunction(
@@ -183,7 +193,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getAndOrColCell
*/
- public function testGetAndOrColCell(){
+ public function testGetAndOrColCell()
+ {
$this->assertEquals(
'
Or:And: Ins Del
',
$this->_callProtectedFunction(
@@ -196,7 +207,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getModifyColumnsRow
*/
- public function testGetModifyColumnsRow(){
+ public function testGetModifyColumnsRow()
+ {
$this->assertEquals(
'
Modify:
Or:And: Ins Del
Or:And: Ins Del
Or:And: Ins Del
',
$this->_callProtectedFunction(
@@ -209,13 +221,14 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getInsDelAndOrCell
*/
- public function testGetInsDelAndOrCell(){
+ public function testGetInsDelAndOrCell()
+ {
$GLOBALS['cell_align_right'] = 'cellAlign';
$this->assertEquals(
- '
Ins:
And:
Del:
Or:
',
+ '
Ins:
And:
Del:
Or:
',
$this->_callProtectedFunction(
'_getInsDelAndOrCell',
- array(3, 'checked')
+ array(3, array('and' => '', 'or' => ' checked="checked"'))
)
);
}
@@ -223,7 +236,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getInputboxRow
*/
- public function testGetInputboxRow(){
+ public function testGetInputboxRow()
+ {
$this->assertEquals(
'
',
$this->_callProtectedFunction(
@@ -236,7 +250,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getInsDelAndOrCriteriaRows
*/
- public function testGetInsDelAndOrCriteriaRows(){
+ public function testGetInsDelAndOrCriteriaRows()
+ {
$this->assertEquals(
'
Ins:
And:
Del:
Or:
',
$this->_callProtectedFunction(
@@ -249,7 +264,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getSelectClause
*/
- public function testGetSelectClause(){
+ public function testGetSelectClause()
+ {
$this->assertEquals(
'',
$this->_callProtectedFunction(
@@ -262,7 +278,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getWhereClause
*/
- public function testGetWhereClause(){
+ public function testGetWhereClause()
+ {
$this->assertEquals(
'',
$this->_callProtectedFunction(
@@ -275,7 +292,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getOrderByClause
*/
- public function testGetOrderByClause(){
+ public function testGetOrderByClause()
+ {
$this->assertEquals(
'',
$this->_callProtectedFunction(
@@ -288,7 +306,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getIndexes
*/
- public function testGetIndexes(){
+ public function testGetIndexes()
+ {
if (! function_exists('PMA_DBI_get_table_indexes')) {
function PMA_DBI_get_table_indexes()
{
@@ -314,7 +333,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getLeftJoinColumnCandidates
*/
- public function test_getLeftJoinColumnCandidates(){
+ public function test_getLeftJoinColumnCandidates()
+ {
if (! function_exists('PMA_DBI_select_db')) {
function PMA_DBI_select_db()
{
@@ -339,7 +359,8 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getMasterTable
*/
- public function test_getMasterTable(){
+ public function test_getMasterTable()
+ {
$this->assertEquals(
0,
$this->_callProtectedFunction(
@@ -357,8 +378,14 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getWhereClauseTablesAndColumns
*/
- public function test_getWhereClauseTablesAndColumns(){
- $_POST['criteriaColumn'] = array('table1.id', 'table1.value', 'table1.name', 'table1.deleted');
+ public function test_getWhereClauseTablesAndColumns()
+ {
+ $_POST['criteriaColumn'] = array(
+ 'table1.id',
+ 'table1.value',
+ 'table1.name',
+ 'table1.deleted'
+ );
$this->assertEquals(
array(
'where_clause_tables' => array(),
@@ -374,12 +401,13 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getFromClause
*/
- public function testGetFromClause(){
+ public function testGetFromClause()
+ {
$this->assertEquals(
- '`table1`',
+ 'table1',
$this->_callProtectedFunction(
'_getFromClause',
- array('relation')
+ array(array('relwork' => False))
)
);
}
@@ -387,13 +415,14 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
/**
* Test for _getSQLQuery
*/
- public function test_getSQLQuery(){
+ public function test_getSQLQuery()
+ {
$this->assertEquals(
- 'FROM `table1`
+ 'FROM table1
',
$this->_callProtectedFunction(
'_getSQLQuery',
- array('relation')
+ array(array('relwork' => False))
)
);
}
diff --git a/test/classes/PMA_DbSearch_test.php b/test/classes/PMA_DbSearch_test.php
index 4bcb52bd8e..e55ab196a8 100644
--- a/test/classes/PMA_DbSearch_test.php
+++ b/test/classes/PMA_DbSearch_test.php
@@ -41,7 +41,10 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
);
}
}
- $this->object = $this->getMockForAbstractClass('PMA_DbSearch', array('pma'));
+ $this->object = $this->getMockForAbstractClass(
+ 'PMA_DbSearch',
+ array('pma')
+ );
}
/**
@@ -75,14 +78,19 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
/**
* Test for getCommonFunctions
*/
- public function testGetCommonFunctions(){
- $this->assertTrue($this->object->getCommonFunctions() instanceof PMA_CommonFunctions);
+ public function testGetCommonFunctions()
+ {
+ $this->assertInstanceOf(
+ 'PMA_CommonFunctions',
+ $this->object->getCommonFunctions()
+ );
}
/**
* Test for _getSearchSqls
*/
- public function testGetSearchSqls(){
+ public function testGetSearchSqls()
+ {
$GLOBALS['db'] = 'pma';
if (! function_exists('PMA_DBI_get_columns')) {
@@ -111,7 +119,8 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
/**
* Test for getSearchResults
*/
- public function testGetSearchResults(){
+ public function testGetSearchResults()
+ {
$this->assertEquals(
'
Search results for "" :
',
$this->object->getSearchResults()
@@ -127,7 +136,9 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
*
* @dataProvider providerForTestGetResultsRow
*/
- public function testGetResultsRow($each_table, $newsearchsqls, $odd_row, $output){
+ public function testGetResultsRow(
+ $each_table, $newsearchsqls, $odd_row, $output
+ ){
if (! function_exists('PMA_DBI_fetch_value')) {
function PMA_DBI_fetch_value()
@@ -148,7 +159,8 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
/**
* @return array provider for testGetResultsRow
*/
- public function providerForTestGetResultsRow(){
+ public function providerForTestGetResultsRow()
+ {
return array(
array(
'table1',
@@ -168,7 +180,8 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
/**
* Test for getSelectionForm
*/
- public function testGetSelectionForm(){
+ public function testGetSelectionForm()
+ {
$_SESSION[' PMA_token '] = 'token';
$_SESSION['PMA_Theme'] = new PMA_Theme();
$GLOBALS['pmaThemeImage'] = 'themes/dot.gif';
@@ -190,7 +203,8 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
/**
* Test for _getResultDivs
*/
- public function testGetResultDivs(){
+ public function testGetResultDivs()
+ {
$this->assertEquals(
'
',
$this->_callProtectedFunction(
diff --git a/test/classes/PMA_Theme_Manager_test.php b/test/classes/PMA_Theme_Manager_test.php
index 7e20d743cd..833ce22efa 100644
--- a/test/classes/PMA_Theme_Manager_test.php
+++ b/test/classes/PMA_Theme_Manager_test.php
@@ -48,7 +48,10 @@ class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase
public function testHtmlSelectBox()
{
$tm = new PMA_Theme_Manager();
- $this->assertContains('