Merge remote-tracking branch 'yasitha/master'
This commit is contained in:
commit
cca78aa58c
@ -107,11 +107,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetSortSelectCell(){
|
||||
$this->assertEquals(
|
||||
'<td class="center"><select style="width: 12ex" name="criteriaSort[1]" size="1"><option value=""> </option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getSortSelectCell',
|
||||
array(1)
|
||||
),
|
||||
'<td class="center"><select style="width: 12ex" name="criteriaSort[1]" size="1"><option value=""> </option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -120,12 +120,12 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetSortRow(){
|
||||
$this->assertEquals(
|
||||
'<tr class="even noclick"><th>Sort:</th><td class="center"><select style="width: 12ex" name="criteriaSort[0]" size="1"><option value=""> </option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td><td class="center"><select style="width: 12ex" name="criteriaSort[1]" size="1"><option value=""> </option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td><td class="center"><select style="width: 12ex" name="criteriaSort[2]" size="1"><option value=""> </option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td></tr>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getSortRow',
|
||||
array()
|
||||
),
|
||||
'<tr class="even noclick"><th>Sort:</th><td class="center"><select style="width: 12ex" name="criteriaSort[0]" size="1"><option value=""> </option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td><td class="center"><select style="width: 12ex" name="criteriaSort[1]" size="1"><option value=""> </option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td><td class="center"><select style="width: 12ex" name="criteriaSort[2]" size="1"><option value=""> </option><option value="ASC">Ascending</option><option value="DESC">Descending</option></select></td></tr>'
|
||||
);
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -133,11 +133,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetShowRow(){
|
||||
$this->assertEquals(
|
||||
'<tr class="odd noclick"><th>Show:</th><td class="center"><input type="checkbox" name="criteriaShow[0]" /></td><td class="center"><input type="checkbox" name="criteriaShow[1]" /></td><td class="center"><input type="checkbox" name="criteriaShow[2]" /></td></tr>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getShowRow',
|
||||
array()
|
||||
),
|
||||
'<tr class="odd noclick"><th>Show:</th><td class="center"><input type="checkbox" name="criteriaShow[0]" /></td><td class="center"><input type="checkbox" name="criteriaShow[1]" /></td><td class="center"><input type="checkbox" name="criteriaShow[2]" /></td></tr>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -146,11 +146,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetCriteriaInputboxRow(){
|
||||
$this->assertEquals(
|
||||
'<tr class="even noclick"><th>Criteria:</th><td class="center"><input type="hidden" name="prev_criteria[0]" value="" /><input type="text" name="criteria[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="hidden" name="prev_criteria[1]" value="" /><input type="text" name="criteria[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="hidden" name="prev_criteria[2]" value="" /><input type="text" name="criteria[2]" value="" class="textfield" style="width: 12ex" size="20" /></td></tr>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getCriteriaInputboxRow',
|
||||
array()
|
||||
),
|
||||
'<tr class="even noclick"><th>Criteria:</th><td class="center"><input type="hidden" name="prev_criteria[0]" value="" /><input type="text" name="criteria[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="hidden" name="prev_criteria[1]" value="" /><input type="text" name="criteria[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="hidden" name="prev_criteria[2]" value="" /><input type="text" name="criteria[2]" value="" class="textfield" style="width: 12ex" size="20" /></td></tr>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -159,11 +159,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetFootersOptions(){
|
||||
$this->assertEquals(
|
||||
'<div class="floatleft">Add/Delete criteria rows:<select size="1" name="criteriaRowAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getFootersOptions',
|
||||
array('row')
|
||||
),
|
||||
'<div class="floatleft">Add/Delete criteria rows:<select size="1" name="criteriaRowAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -172,11 +172,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetTableFooters(){
|
||||
$this->assertEquals(
|
||||
'<fieldset class="tblFooters"><div class="floatleft">Add/Delete criteria rows:<select size="1" name="criteriaRowAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="floatleft">Add/Delete columns:<select size="1" name="criteriaColumnAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="floatleft"><input type="submit" name="modify"value="Update Query" /></div></fieldset>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getTableFooters',
|
||||
array()
|
||||
),
|
||||
'<fieldset class="tblFooters"><div class="floatleft">Add/Delete criteria rows:<select size="1" name="criteriaRowAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="floatleft">Add/Delete columns:<select size="1" name="criteriaColumnAdd"><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select></div><div class="floatleft"><input type="submit" name="modify"value="Update Query" /></div></fieldset>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -185,11 +185,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetAndOrColCell(){
|
||||
$this->assertEquals(
|
||||
'<td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="or" /> <strong>And:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="and" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[1]" /> Del<input type="checkbox" name="criteriaColumnDelete[1]" /></td>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getAndOrColCell',
|
||||
array(1)
|
||||
),
|
||||
'<td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="or" /> <strong>And:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="and" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[1]" /> Del<input type="checkbox" name="criteriaColumnDelete[1]" /></td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -198,11 +198,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetModifyColumnsRow(){
|
||||
$this->assertEquals(
|
||||
'<tr class="even noclick"><th>Modify:</th><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[0]" value="or" /> <strong>And:</strong><input type="radio" name="criteriaAndOrColumn[0]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[0]" /> Del<input type="checkbox" name="criteriaColumnDelete[0]" /></td><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="or" /> <strong>And:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[1]" /> Del<input type="checkbox" name="criteriaColumnDelete[1]" /></td><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[2]" value="or" /> <strong>And:</strong><input type="radio" name="criteriaAndOrColumn[2]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[2]" /> Del<input type="checkbox" name="criteriaColumnDelete[2]" /></td></tr>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getModifyColumnsRow',
|
||||
array()
|
||||
),
|
||||
'<tr class="even noclick"><th>Modify:</th><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[0]" value="or" /> <strong>And:</strong><input type="radio" name="criteriaAndOrColumn[0]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[0]" /> Del<input type="checkbox" name="criteriaColumnDelete[0]" /></td><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="or" /> <strong>And:</strong><input type="radio" name="criteriaAndOrColumn[1]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[1]" /> Del<input type="checkbox" name="criteriaColumnDelete[1]" /></td><td class="center"><strong>Or:</strong><input type="radio" name="criteriaAndOrColumn[2]" value="or" /> <strong>And:</strong><input type="radio" name="criteriaAndOrColumn[2]" value="and" checked="checked" /><br />Ins<input type="checkbox" name="criteriaColumnInsert[2]" /> Del<input type="checkbox" name="criteriaColumnDelete[2]" /></td></tr>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -212,11 +212,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetInsDelAndOrCell(){
|
||||
$GLOBALS['cell_align_right'] = 'cellAlign';
|
||||
$this->assertEquals(
|
||||
'<td class="cellAlign nowrap"><!-- Row controls --><table class="nospacing nopadding"><tr><td class="cellAlign nowrap"><small>Ins:</small><input type="checkbox" name="criteriaRowInsert[3]" /></td><td class="cellAlign"><strong>And:</strong></td><td><input type="radio" name="criteriaAndOrRow[3]" value="and"c /></td></tr><tr><td class="cellAlign nowrap"><small>Del:</small><input type="checkbox" name="criteriaRowDelete[3]" /></td><td class="cellAlign"><strong>Or:</strong></td><td><input type="radio" name="criteriaAndOrRow[3]" value="or"c /></td></tr></table></td>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getInsDelAndOrCell',
|
||||
array(3, 'checked')
|
||||
),
|
||||
'<td class="cellAlign nowrap"><!-- Row controls --><table class="nospacing nopadding"><tr><td class="cellAlign nowrap"><small>Ins:</small><input type="checkbox" name="criteriaRowInsert[3]" /></td><td class="cellAlign"><strong>And:</strong></td><td><input type="radio" name="criteriaAndOrRow[3]" value="and"c /></td></tr><tr><td class="cellAlign nowrap"><small>Del:</small><input type="checkbox" name="criteriaRowDelete[3]" /></td><td class="cellAlign"><strong>Or:</strong></td><td><input type="radio" name="criteriaAndOrRow[3]" value="or"c /></td></tr></table></td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -225,11 +225,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetInputboxRow(){
|
||||
$this->assertEquals(
|
||||
'<td class="center"><input type="text" name="Or2[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or2[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or2[2]" value="" class="textfield" style="width: 12ex" size="20" /></td>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getInputboxRow',
|
||||
array(2,3)
|
||||
),
|
||||
'<td class="center"><input type="text" name="Or2[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or2[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or2[2]" value="" class="textfield" style="width: 12ex" size="20" /></td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -238,11 +238,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetInsDelAndOrCriteriaRows(){
|
||||
$this->assertEquals(
|
||||
'<tr class="odd noclick"><td class="cellAlign nowrap"><!-- Row controls --><table class="nospacing nopadding"><tr><td class="cellAlign nowrap"><small>Ins:</small><input type="checkbox" name="criteriaRowInsert[0]" /></td><td class="cellAlign"><strong>And:</strong></td><td><input type="radio" name="criteriaAndOrRow[0]" value="and" /></td></tr><tr><td class="cellAlign nowrap"><small>Del:</small><input type="checkbox" name="criteriaRowDelete[0]" /></td><td class="cellAlign"><strong>Or:</strong></td><td><input type="radio" name="criteriaAndOrRow[0]" value="or" checked="checked" /></td></tr></table></td><td class="center"><input type="text" name="Or0[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or0[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or0[2]" value="" class="textfield" style="width: 12ex" size="20" /></td></tr>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getInsDelAndOrCriteriaRows',
|
||||
array(2,3)
|
||||
),
|
||||
'<tr class="odd noclick"><td class="cellAlign nowrap"><!-- Row controls --><table class="nospacing nopadding"><tr><td class="cellAlign nowrap"><small>Ins:</small><input type="checkbox" name="criteriaRowInsert[0]" /></td><td class="cellAlign"><strong>And:</strong></td><td><input type="radio" name="criteriaAndOrRow[0]" value="and" /></td></tr><tr><td class="cellAlign nowrap"><small>Del:</small><input type="checkbox" name="criteriaRowDelete[0]" /></td><td class="cellAlign"><strong>Or:</strong></td><td><input type="radio" name="criteriaAndOrRow[0]" value="or" checked="checked" /></td></tr></table></td><td class="center"><input type="text" name="Or0[0]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or0[1]" value="" class="textfield" style="width: 12ex" size="20" /></td><td class="center"><input type="text" name="Or0[2]" value="" class="textfield" style="width: 12ex" size="20" /></td></tr>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -251,11 +251,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetSelectClause(){
|
||||
$this->assertEquals(
|
||||
'',
|
||||
$this->_callProtectedFunction(
|
||||
'_getSelectClause',
|
||||
array()
|
||||
),
|
||||
''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -264,11 +264,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetWhereClause(){
|
||||
$this->assertEquals(
|
||||
'',
|
||||
$this->_callProtectedFunction(
|
||||
'_getWhereClause',
|
||||
array()
|
||||
),
|
||||
''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -277,11 +277,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetOrderByClause(){
|
||||
$this->assertEquals(
|
||||
'',
|
||||
$this->_callProtectedFunction(
|
||||
'_getOrderByClause',
|
||||
array()
|
||||
),
|
||||
''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -296,6 +296,10 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
}
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'unique' => array(),
|
||||
'index' => array()
|
||||
),
|
||||
$this->_callProtectedFunction(
|
||||
'_getIndexes',
|
||||
array(
|
||||
@ -303,10 +307,6 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
array('column1', 'column2', 'column3'),
|
||||
array('column2')
|
||||
)
|
||||
),
|
||||
array(
|
||||
'unique' => array(),
|
||||
'index' => array()
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -322,6 +322,9 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
}
|
||||
$this->assertEquals(
|
||||
array(
|
||||
0 => 'column2'
|
||||
),
|
||||
$this->_callProtectedFunction(
|
||||
'_getLeftJoinColumnCandidates',
|
||||
array(
|
||||
@ -329,9 +332,6 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
array('column1', 'column2', 'column3'),
|
||||
array('column2')
|
||||
)
|
||||
),
|
||||
array(
|
||||
0 => 'column2'
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -341,6 +341,7 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function test_getMasterTable(){
|
||||
$this->assertEquals(
|
||||
0,
|
||||
$this->_callProtectedFunction(
|
||||
'_getMasterTable',
|
||||
array(
|
||||
@ -349,8 +350,7 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
array('column2'),
|
||||
array('pma')
|
||||
)
|
||||
),
|
||||
0
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -360,13 +360,13 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
public function test_getWhereClauseTablesAndColumns(){
|
||||
$_POST['criteriaColumn'] = array('table1.id', 'table1.value', 'table1.name', 'table1.deleted');
|
||||
$this->assertEquals(
|
||||
$this->_callProtectedFunction(
|
||||
'_getWhereClauseTablesAndColumns',
|
||||
array()
|
||||
),
|
||||
array(
|
||||
'where_clause_tables' => array(),
|
||||
'where_clause_columns' => array()
|
||||
),
|
||||
$this->_callProtectedFunction(
|
||||
'_getWhereClauseTablesAndColumns',
|
||||
array()
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -376,11 +376,11 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetFromClause(){
|
||||
$this->assertEquals(
|
||||
'`table1`',
|
||||
$this->_callProtectedFunction(
|
||||
'_getFromClause',
|
||||
array('relation')
|
||||
),
|
||||
'`table1`'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -389,12 +389,12 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function test_getSQLQuery(){
|
||||
$this->assertEquals(
|
||||
'FROM `table1`
|
||||
',
|
||||
$this->_callProtectedFunction(
|
||||
'_getSQLQuery',
|
||||
array('relation')
|
||||
),
|
||||
'FROM `table1`
|
||||
'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,15 +96,15 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
$this->assertEquals(
|
||||
array (
|
||||
'select_columns' => 'SELECT * FROM `pma`.`table1` WHERE FALSE',
|
||||
'select_count' => 'SELECT COUNT(*) AS `count` FROM `pma`.`table1` WHERE FALSE',
|
||||
'delete' => 'DELETE FROM `pma`.`table1` WHERE FALSE'
|
||||
),
|
||||
$this->_callProtectedFunction(
|
||||
'_getSearchSqls',
|
||||
array('table1')
|
||||
),
|
||||
array (
|
||||
'select_columns' => 'SELECT * FROM `pma`.`table1` WHERE FALSE',
|
||||
'select_count' => 'SELECT COUNT(*) AS `count` FROM `pma`.`table1` WHERE FALSE',
|
||||
'delete' => 'DELETE FROM `pma`.`table1` WHERE FALSE'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -113,8 +113,8 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetSearchResults(){
|
||||
$this->assertEquals(
|
||||
$this->object->getSearchResults(),
|
||||
'<br /><table class="data"><caption class="tblHeaders">Search results for "<i></i>" :</caption></table>'
|
||||
'<br /><table class="data"><caption class="tblHeaders">Search results for "<i></i>" :</caption></table>',
|
||||
$this->object->getSearchResults()
|
||||
);
|
||||
}
|
||||
|
||||
@ -137,11 +137,11 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
$GLOBALS['cfg']['AjaxEnable'] = true;
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callProtectedFunction(
|
||||
'_getResultsRow',
|
||||
array($each_table, $newsearchsqls, $odd_row)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -174,7 +174,6 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['pmaThemeImage'] = 'themes/dot.gif';
|
||||
$url_params = array('param1', 'param2');
|
||||
$this->assertEquals(
|
||||
$this->object->getSelectionForm($url_params),
|
||||
'<a id="db_search"></a><form id="db_search_form" class="ajax" method="post" action="db_search.php" name="db_search"><input type="hidden" name="db" value="pma" /><input type="hidden" name="lang" value="en" /><input type="hidden" name="token" value="token" /><fieldset><legend>Search in database</legend><table class="formlayout"><tr><td>Words or values to search for (wildcard: "%"):</td><td><input type="text" name="criteriaSearchString" size="60" value="" /></td></tr><tr><td class="right vtop">Find:</td><td><input type="radio" name="criteriaSearchType" id="criteriaSearchType_1" value="1" checked="checked" />
|
||||
<label for="criteriaSearchType_1">at least one of the words<span class="pma_hint"><img src="themes/dot.gifb_help.png" title="" alt="" /><span class="hide">Words are separated by a space character (" ").</span></span></label><br />
|
||||
<input type="radio" name="criteriaSearchType" id="criteriaSearchType_2" value="2" />
|
||||
@ -183,7 +182,8 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
|
||||
<label for="criteriaSearchType_3">the exact phrase</label><br />
|
||||
<input type="radio" name="criteriaSearchType" id="criteriaSearchType_4" value="4" />
|
||||
<label for="criteriaSearchType_4">as regular expression <a href="./url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.0%2Fen%2Fregexp.html&server=0&lang=en&token=token" target="mysql_doc"><img src="themes/dot.gifb_help.png" title="Documentation" alt="Documentation" /></a></label><br />
|
||||
</td></tr><tr><td class="right vtop">Inside tables:</td><td rowspan="2"><select name="criteriaTables[]" size="6" multiple="multiple"><option value="table1">table1</option><option value="table2">table2</option></select></td></tr><tr><td class="right vbottom"><a href="db_search.php?0=param1&1=param2&selectall=1&server=0&lang=en&token=token#db_search" onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', true); return false;">Select All</a> / <a href="db_search.php?0=param1&1=param2&unselectall=1&server=0&lang=en&token=token#db_search" onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', false); return false;">Unselect All</a></td></tr><tr><td class="right">Inside column:</td><td><input type="text" name="criteriaColumnName" size="60"value="" /></td></tr></table></fieldset><fieldset class="tblFooters"><input type="submit" name="submit_search" value="Go" id="buttonGo" /></fieldset></form><!-- These two table-image and table-link elements display the table name in browse search results --><div id="table-info"><a class="item" id="table-link" ></a></div><div id="browse-results"><!-- this browse-results div is used to load the browse and delete results in the db search --></div><br class="clearfloat" /><div id="sqlqueryform"><!-- this sqlqueryform div is used to load the delete form in the db search --></div><!-- toggle query box link--><a id="togglequerybox"></a>'
|
||||
</td></tr><tr><td class="right vtop">Inside tables:</td><td rowspan="2"><select name="criteriaTables[]" size="6" multiple="multiple"><option value="table1">table1</option><option value="table2">table2</option></select></td></tr><tr><td class="right vbottom"><a href="db_search.php?0=param1&1=param2&selectall=1&server=0&lang=en&token=token#db_search" onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', true); return false;">Select All</a> / <a href="db_search.php?0=param1&1=param2&unselectall=1&server=0&lang=en&token=token#db_search" onclick="setSelectOptions(\'db_search\', \'criteriaTables[]\', false); return false;">Unselect All</a></td></tr><tr><td class="right">Inside column:</td><td><input type="text" name="criteriaColumnName" size="60"value="" /></td></tr></table></fieldset><fieldset class="tblFooters"><input type="submit" name="submit_search" value="Go" id="buttonGo" /></fieldset></form><!-- These two table-image and table-link elements display the table name in browse search results --><div id="table-info"><a class="item" id="table-link" ></a></div><div id="browse-results"><!-- this browse-results div is used to load the browse and delete results in the db search --></div><br class="clearfloat" /><div id="sqlqueryform"><!-- this sqlqueryform div is used to load the delete form in the db search --></div><!-- toggle query box link--><a id="togglequerybox"></a>',
|
||||
$this->object->getSelectionForm($url_params)
|
||||
);
|
||||
}
|
||||
|
||||
@ -192,11 +192,11 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetResultDivs(){
|
||||
$this->assertEquals(
|
||||
'<!-- These two table-image and table-link elements display the table name in browse search results --><div id="table-info"><a class="item" id="table-link" ></a></div><div id="browse-results"><!-- this browse-results div is used to load the browse and delete results in the db search --></div><br class="clearfloat" /><div id="sqlqueryform"><!-- this sqlqueryform div is used to load the delete form in the db search --></div><!-- toggle query box link--><a id="togglequerybox"></a>',
|
||||
$this->_callProtectedFunction(
|
||||
'_getResultDivs',
|
||||
array()
|
||||
),
|
||||
'<!-- These two table-image and table-link elements display the table name in browse search results --><div id="table-info"><a class="item" id="table-link" ></a></div><div id="browse-results"><!-- this browse-results div is used to load the browse and delete results in the db search --></div><br class="clearfloat" /><div id="sqlqueryform"><!-- this sqlqueryform div is used to load the delete form in the db search --></div><!-- toggle query box link--><a id="togglequerybox"></a>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ class PMA_Error_Handler_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
$GLOBALS['cfg']['Error_Handler']['gather'] = true;
|
||||
|
||||
$this->assertEquals($this->object->handleError($errno, $errstr, $errfile, $errline), $output);
|
||||
$this->assertEquals( $output, $this->object->handleError($errno, $errstr, $errfile, $errline));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -114,8 +114,9 @@ class PMA_Error_Handler_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetDispUserErrors()
|
||||
{
|
||||
|
||||
$this->assertEquals($this->object->getDispUserErrors(),
|
||||
'<div class="notice">Compile Error</div>'
|
||||
$this->assertEquals(
|
||||
'<div class="notice">Compile Error</div>',
|
||||
$this->object->getDispUserErrors()
|
||||
);
|
||||
}
|
||||
|
||||
@ -126,8 +127,9 @@ class PMA_Error_Handler_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
$GLOBALS['cfg']['Error_Handler']['display'] = false;
|
||||
$this->assertEquals($this->object->getDispUserErrors(),
|
||||
''
|
||||
$this->assertEquals(
|
||||
'',
|
||||
$this->object->getDispUserErrors()
|
||||
);
|
||||
}
|
||||
|
||||
@ -139,8 +141,9 @@ class PMA_Error_Handler_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
$GLOBALS['cfg']['Error_Handler']['display'] = true;
|
||||
|
||||
$this->assertEquals($this->object->getDispErrors(),
|
||||
''
|
||||
$this->assertEquals(
|
||||
'',
|
||||
$this->object->getDispErrors()
|
||||
);
|
||||
|
||||
}
|
||||
@ -173,8 +176,9 @@ class PMA_Error_Handler_test extends PHPUnit_Framework_TestCase
|
||||
->method('getErrors')
|
||||
->will($this->returnValue($err));
|
||||
|
||||
$this->assertEquals($this->object->countErrors(),
|
||||
0
|
||||
$this->assertEquals(
|
||||
0,
|
||||
$this->object->countErrors()
|
||||
);
|
||||
}
|
||||
|
||||
@ -191,8 +195,9 @@ class PMA_Error_Handler_test extends PHPUnit_Framework_TestCase
|
||||
->method('countErrors', 'getErrors')
|
||||
->will($this->returnValue(1, $err));
|
||||
|
||||
$this->assertEquals($this->object->countUserErrors(),
|
||||
0
|
||||
$this->assertEquals(
|
||||
0,
|
||||
$this->object->countUserErrors()
|
||||
);
|
||||
}
|
||||
|
||||
@ -218,8 +223,9 @@ class PMA_Error_Handler_test extends PHPUnit_Framework_TestCase
|
||||
public function testCountDisplayErrorsForDisplayTrue()
|
||||
{
|
||||
$GLOBALS['cfg']['Error_Handler']['display'] = true;
|
||||
$this->assertEquals($this->object->countDisplayErrors(),
|
||||
0
|
||||
$this->assertEquals(
|
||||
0,
|
||||
$this->object->countDisplayErrors()
|
||||
);
|
||||
}
|
||||
|
||||
@ -229,8 +235,9 @@ class PMA_Error_Handler_test extends PHPUnit_Framework_TestCase
|
||||
public function testCountDisplayErrorsForDisplayFalse()
|
||||
{
|
||||
$GLOBALS['cfg']['Error_Handler']['display'] = false;
|
||||
$this->assertEquals($this->object->countDisplayErrors(),
|
||||
0
|
||||
$this->assertEquals(
|
||||
0,
|
||||
$this->object->countDisplayErrors()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -86,10 +86,6 @@ class PMA_Footer_test extends PHPUnit_Framework_TestCase
|
||||
$_SESSION['debug']['queries'] = array('SELECT * FROM `pma_bookmark` WHERE 1', 'SELECT * FROM `db` WHERE 1');
|
||||
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction(
|
||||
'_getDebugMessage',
|
||||
array()
|
||||
),
|
||||
'<div>2 queries executed 0 times in 0 seconds<pre>Array
|
||||
(
|
||||
[queries] => Array
|
||||
@ -99,7 +95,11 @@ class PMA_Footer_test extends PHPUnit_Framework_TestCase
|
||||
)
|
||||
|
||||
)
|
||||
</pre></div>'
|
||||
</pre></div>',
|
||||
$this->_callPrivateFunction(
|
||||
'_getDebugMessage',
|
||||
array()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -112,11 +112,11 @@ class PMA_Footer_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['ServerDefault'] = 1;
|
||||
|
||||
$this->assertEquals(
|
||||
'<div id="selflink" class="print_ignore"><a href="index.phpdb=db%3Dmysql%26token%3D1234&lang=en&collation_connection=utf8_general_ci&token=token" title="Open new phpMyAdmin window" target="_blank">Open new phpMyAdmin window</a></div>',
|
||||
$this->_callPrivateFunction(
|
||||
'_getSelfLink',
|
||||
array('db=mysql&token=1234')
|
||||
),
|
||||
'<div id="selflink" class="print_ignore"><a href="index.phpdb=db%3Dmysql%26token%3D1234&lang=en&collation_connection=utf8_general_ci&token=token" title="Open new phpMyAdmin window" target="_blank">Open new phpMyAdmin window</a></div>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -131,11 +131,11 @@ class PMA_Footer_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['pmaThemeImage'] = 'image';
|
||||
|
||||
$this->assertEquals(
|
||||
'<div id="selflink" class="print_ignore"><a href="index.phpdb=db%3Dmysql%26token%3D1234&lang=en&collation_connection=utf8_general_ci&token=token" title="Open new phpMyAdmin window" target="_blank"><img src="imagewindow-new.png" title="Open new phpMyAdmin window" alt="Open new phpMyAdmin window" /></a></div>',
|
||||
$this->_callPrivateFunction(
|
||||
'_getSelfLink',
|
||||
array('db=mysql&token=1234')
|
||||
),
|
||||
'<div id="selflink" class="print_ignore"><a href="index.phpdb=db%3Dmysql%26token%3D1234&lang=en&collation_connection=utf8_general_ci&token=token" title="Open new phpMyAdmin window" target="_blank"><img src="imagewindow-new.png" title="Open new phpMyAdmin window" alt="Open new phpMyAdmin window" /></a></div>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -71,11 +71,11 @@ class PMA_Scripts_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testIncludeFile($url, $timestamp, $ie_conditional, $output){
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_includeFile',
|
||||
array($url, $timestamp, $ie_conditional)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -130,10 +130,10 @@ class PMA_Scripts_test extends PHPUnit_Framework_TestCase
|
||||
$this->object->addCode('alert(\'CodeAdded\')');
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getDisplay(),
|
||||
'<script type="text/javascript">// <![CDATA[
|
||||
alert(\'CodeAdded\')
|
||||
// ]]></script>'
|
||||
// ]]></script>',
|
||||
$this->object->getDisplay()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,11 +62,11 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetStorageEngines(){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getStorageEngines(),
|
||||
array(
|
||||
'dummy' => 'table1',
|
||||
'engine' => 'table`2'
|
||||
)
|
||||
),
|
||||
$this->object->getStorageEngines()
|
||||
);
|
||||
}
|
||||
|
||||
@ -78,7 +78,6 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetHtmlSelect(){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getHtmlSelect(),
|
||||
'<select name="engine">
|
||||
<option value="dummy" title="t">
|
||||
t
|
||||
@ -87,7 +86,8 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
t
|
||||
</option>
|
||||
</select>
|
||||
'
|
||||
',
|
||||
$this->object->getHtmlSelect()
|
||||
);
|
||||
}
|
||||
|
||||
@ -130,8 +130,8 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetInfoPages(){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getInfoPages(),
|
||||
array()
|
||||
array(),
|
||||
$this->object->getInfoPages()
|
||||
);
|
||||
}
|
||||
|
||||
@ -151,8 +151,8 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetMysqlHelpPage(){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getMysqlHelpPage(),
|
||||
'dummy-storage-engine'
|
||||
'dummy-storage-engine',
|
||||
$this->object->getMysqlHelpPage()
|
||||
);
|
||||
}
|
||||
|
||||
@ -162,8 +162,8 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetVariables(){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getVariables(),
|
||||
array()
|
||||
array(),
|
||||
$this->object->getVariables()
|
||||
);
|
||||
}
|
||||
|
||||
@ -172,26 +172,26 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetSupportInformationMessage(){
|
||||
$this->assertEquals(
|
||||
$this->object->getSupportInformationMessage(),
|
||||
'This MySQL server does not support the t storage engine.'
|
||||
'This MySQL server does not support the t storage engine.',
|
||||
$this->object->getSupportInformationMessage()
|
||||
);
|
||||
|
||||
$this->object->support = 1;
|
||||
$this->assertEquals(
|
||||
$this->object->getSupportInformationMessage(),
|
||||
't has been disabled for this MySQL server.'
|
||||
't has been disabled for this MySQL server.',
|
||||
$this->object->getSupportInformationMessage()
|
||||
);
|
||||
|
||||
$this->object->support = 2;
|
||||
$this->assertEquals(
|
||||
$this->object->getSupportInformationMessage(),
|
||||
't is available on this MySQL server.'
|
||||
't is available on this MySQL server.',
|
||||
$this->object->getSupportInformationMessage()
|
||||
);
|
||||
|
||||
$this->object->support = 3;
|
||||
$this->assertEquals(
|
||||
$this->object->getSupportInformationMessage(),
|
||||
't is the default storage engine on this MySQL server.'
|
||||
't is the default storage engine on this MySQL server.',
|
||||
$this->object->getSupportInformationMessage()
|
||||
);
|
||||
}
|
||||
|
||||
@ -201,8 +201,8 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetComment(){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getComment(),
|
||||
't'
|
||||
't',
|
||||
$this->object->getComment()
|
||||
);
|
||||
}
|
||||
|
||||
@ -212,8 +212,8 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetTitle(){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getTitle(),
|
||||
't'
|
||||
't',
|
||||
$this->object->getTitle()
|
||||
);
|
||||
}
|
||||
|
||||
@ -233,11 +233,11 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
public function testResolveTypeSize(){
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->resolveTypeSize(12),
|
||||
array(
|
||||
0 => 12,
|
||||
1 => 'B'
|
||||
)
|
||||
),
|
||||
$this->object->resolveTypeSize(12)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,8 +38,8 @@ class PMA_Types_Drizzle_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetTypeDescription($type, $output){
|
||||
$this->assertEquals(
|
||||
$this->object->getTypeDescription($type),
|
||||
$output
|
||||
$output,
|
||||
$this->object->getTypeDescription($type)
|
||||
);
|
||||
}
|
||||
|
||||
@ -130,8 +130,8 @@ class PMA_Types_Drizzle_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetTypeClass($type, $output){
|
||||
$this->assertEquals(
|
||||
$this->object->getTypeClass($type),
|
||||
$output
|
||||
$output,
|
||||
$this->object->getTypeClass($type)
|
||||
);
|
||||
}
|
||||
|
||||
@ -178,8 +178,8 @@ class PMA_Types_Drizzle_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getFunctionsClass($class),
|
||||
$output
|
||||
$output,
|
||||
$this->object->getFunctionsClass($class)
|
||||
);
|
||||
}
|
||||
|
||||
@ -308,11 +308,11 @@ class PMA_Types_Drizzle_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetAttributes(){
|
||||
$this->assertEquals(
|
||||
$this->object->getAttributes(),
|
||||
array(
|
||||
'',
|
||||
'on update CURRENT_TIMESTAMP',
|
||||
)
|
||||
),
|
||||
$this->object->getAttributes()
|
||||
);
|
||||
}
|
||||
|
||||
@ -326,7 +326,6 @@ class PMA_Types_Drizzle_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getColumns(),
|
||||
array(
|
||||
0 => 'INT',
|
||||
1 => 'VARCHAR',
|
||||
@ -360,7 +359,8 @@ class PMA_Types_Drizzle_test extends PHPUnit_Framework_TestCase
|
||||
'-',
|
||||
'IPV6'
|
||||
),
|
||||
)
|
||||
),
|
||||
$this->object->getColumns()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,8 +38,8 @@ class PMA_Types_MySQL_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetTypeDescription($type, $output){
|
||||
$this->assertEquals(
|
||||
$this->object->getTypeDescription($type),
|
||||
$output
|
||||
$output,
|
||||
$this->object->getTypeDescription($type)
|
||||
);
|
||||
}
|
||||
|
||||
@ -222,8 +222,8 @@ class PMA_Types_MySQL_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetTypeClass($type, $output){
|
||||
$this->assertEquals(
|
||||
$this->object->getTypeClass($type),
|
||||
$output
|
||||
$output,
|
||||
$this->object->getTypeClass($type)
|
||||
);
|
||||
}
|
||||
|
||||
@ -421,14 +421,14 @@ class PMA_Types_MySQL_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetAttributes(){
|
||||
$this->assertEquals(
|
||||
$this->object->getAttributes(),
|
||||
array(
|
||||
'',
|
||||
'BINARY',
|
||||
'UNSIGNED',
|
||||
'UNSIGNED ZEROFILL',
|
||||
'on update CURRENT_TIMESTAMP',
|
||||
)
|
||||
),
|
||||
$this->object->getAttributes()
|
||||
);
|
||||
}
|
||||
|
||||
@ -437,7 +437,6 @@ class PMA_Types_MySQL_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetColumns(){
|
||||
$this->assertEquals(
|
||||
$this->object->getColumns(),
|
||||
array(
|
||||
0 => 'INT',
|
||||
1 => 'VARCHAR',
|
||||
@ -496,7 +495,8 @@ class PMA_Types_MySQL_test extends PHPUnit_Framework_TestCase
|
||||
'MULTIPOLYGON',
|
||||
'GEOMETRYCOLLECTION',
|
||||
)
|
||||
)
|
||||
),
|
||||
$this->object->getColumns()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,13 +43,14 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
* Test for getUnaryOperators
|
||||
*/
|
||||
public function testGetUnaryOperators(){
|
||||
$this->assertEquals($this->object->getUnaryOperators(),
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'IS NULL',
|
||||
'IS NOT NULL',
|
||||
"= ''",
|
||||
"!= ''",
|
||||
)
|
||||
),
|
||||
$this->object->getUnaryOperators()
|
||||
);
|
||||
}
|
||||
|
||||
@ -57,11 +58,12 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
* Test for getNullOperators
|
||||
*/
|
||||
public function testGetNullOperators(){
|
||||
$this->assertEquals($this->object->getNullOperators(),
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'IS NULL',
|
||||
'IS NOT NULL',
|
||||
)
|
||||
),
|
||||
$this->object->getNullOperators()
|
||||
);
|
||||
}
|
||||
|
||||
@ -69,11 +71,12 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
* Test for getEnumOperators
|
||||
*/
|
||||
public function testGetEnumOperators(){
|
||||
$this->assertEquals($this->object->getEnumOperators(),
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'=',
|
||||
'!=',
|
||||
)
|
||||
),
|
||||
$this->object->getEnumOperators()
|
||||
);
|
||||
}
|
||||
|
||||
@ -81,7 +84,7 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
* Test for getTextOperators
|
||||
*/
|
||||
public function testgetTextOperators(){
|
||||
$this->assertEquals($this->object->getTextOperators(),
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'LIKE',
|
||||
'LIKE %...%',
|
||||
@ -97,7 +100,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
'NOT IN (...)',
|
||||
'BETWEEN',
|
||||
'NOT BETWEEN',
|
||||
)
|
||||
),
|
||||
$this->object->getTextOperators()
|
||||
);
|
||||
}
|
||||
|
||||
@ -105,7 +109,7 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
* Test for getNumberOperators
|
||||
*/
|
||||
public function testGetNumberOperators(){
|
||||
$this->assertEquals($this->object->getNumberOperators(),
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'=',
|
||||
'>',
|
||||
@ -119,7 +123,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
'NOT IN (...)',
|
||||
'BETWEEN',
|
||||
'NOT BETWEEN',
|
||||
)
|
||||
),
|
||||
$this->object->getNumberOperators()
|
||||
);
|
||||
}
|
||||
|
||||
@ -132,8 +137,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetTypeOperators($type, $null, $output){
|
||||
$this->assertEquals(
|
||||
$this->object->getTypeOperators($type, $null),
|
||||
$output
|
||||
$output,
|
||||
$this->object->getTypeOperators($type, $null)
|
||||
);
|
||||
}
|
||||
|
||||
@ -193,8 +198,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetTypeOperatorsHtml($type, $null, $selectedOperator, $output){
|
||||
$this->assertEquals(
|
||||
$this->object->getTypeOperatorsHtml($type, $null, $selectedOperator),
|
||||
$output
|
||||
$output,
|
||||
$this->object->getTypeOperatorsHtml($type, $null, $selectedOperator)
|
||||
);
|
||||
}
|
||||
|
||||
@ -217,8 +222,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetTypeDescription(){
|
||||
$this->assertEquals(
|
||||
$this->object->getTypeDescription('enum'),
|
||||
''
|
||||
'',
|
||||
$this->object->getTypeDescription('enum')
|
||||
);
|
||||
}
|
||||
|
||||
@ -227,8 +232,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetFunctionsClass(){
|
||||
$this->assertEquals(
|
||||
$this->object->getFunctionsClass('enum'),
|
||||
array()
|
||||
array(),
|
||||
$this->object->getFunctionsClass('enum')
|
||||
);
|
||||
}
|
||||
|
||||
@ -237,8 +242,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetFunctions(){
|
||||
$this->assertEquals(
|
||||
$this->object->getFunctions('enum'),
|
||||
array()
|
||||
array(),
|
||||
$this->object->getFunctions('enum')
|
||||
);
|
||||
}
|
||||
|
||||
@ -247,8 +252,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetAllFunctions(){
|
||||
$this->assertEquals(
|
||||
$this->object->getAllFunctions(),
|
||||
array()
|
||||
array(),
|
||||
$this->object->getAllFunctions()
|
||||
);
|
||||
}
|
||||
|
||||
@ -257,8 +262,8 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetAttributes(){
|
||||
$this->assertEquals(
|
||||
$this->object->getAttributes(),
|
||||
array()
|
||||
array(),
|
||||
$this->object->getAttributes()
|
||||
);
|
||||
}
|
||||
|
||||
@ -267,13 +272,13 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetColumns(){
|
||||
$this->assertEquals(
|
||||
$this->object->getColumns(),
|
||||
array(
|
||||
'INT',
|
||||
'VARCHAR',
|
||||
'TEXT',
|
||||
'DATE',
|
||||
)
|
||||
),
|
||||
$this->object->getColumns()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user