Skip to content

Commit

Permalink
Merge remote-tracking branch 'yasitha/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Aug 1, 2012
2 parents a15a056 + 0388f9a commit 706205d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
25 changes: 9 additions & 16 deletions test/libraries/PMA_bookmark_test.php
Expand Up @@ -21,7 +21,7 @@ public function setUp(){
if (! function_exists('PMA_getRelationsParam')) {
function PMA_getRelationsParam()
{
$cfgRelation['bookmarkwork'] = true;
$cfgRelation['bookmarkwork'] = false;
return $cfgRelation;
}
}
Expand Down Expand Up @@ -53,11 +53,7 @@ function PMA_DBI_fetch_result()
public function testPMA_Bookmark_getParams(){

$this->assertEquals(
array(
'user' => 'root',
'db' => 'phpmyadmin',
'table'=> 'pma_bookmark'
),
false,
PMA_Bookmark_getParams()
);
}
Expand All @@ -67,10 +63,7 @@ public function testPMA_Bookmark_getParams(){
*/
public function testPMA_Bookmark_getList(){
$this->assertEquals(
array(
0 => 'table1 (shared)',
1 => 'table2 (shared)'
),
array(),
PMA_Bookmark_getList('phpmyadmin')
);
}
Expand All @@ -82,11 +75,11 @@ public function testPMA_Bookmark_get(){
if (! function_exists('PMA_DBI_fetch_value')) {
function PMA_DBI_fetch_value()
{
return "SELECT query FROM `phpmyadmin`.`pma_bookmark` WHERE dbase = 'phpmyadmin' AND (user = 'root' OR user = '') AND `id` = 1";
return '';
}
}
$this->assertEquals(
"SELECT query FROM `phpmyadmin`.`pma_bookmark` WHERE dbase = 'phpmyadmin' AND (user = 'root' OR user = '') AND `id` = 1",
'',
PMA_Bookmark_get('phpmyadmin', '1')
);
}
Expand All @@ -98,10 +91,10 @@ public function testPMA_Bookmark_save(){
if (! function_exists('PMA_DBI_query')) {
function PMA_DBI_query()
{
return true;
return false;
}
}
$this->assertTrue(
$this->assertfalse(
PMA_Bookmark_save(array(
'dbase' => 'phpmyadmin',
'user' => 'phpmyadmin',
Expand All @@ -118,10 +111,10 @@ public function testPMA_Bookmark_delete(){
if (! function_exists('PMA_DBI_try_query')) {
function PMA_DBI_try_query()
{
return true;
return false;
}
}
$this->assertTrue(
$this->assertFalse(
PMA_Bookmark_delete('phpmyadmin', '1')
);
}
Expand Down
2 changes: 1 addition & 1 deletion test/libraries/PMA_build_html_for_db_test.php
Expand Up @@ -149,7 +149,7 @@ public function providerForTestPMA_buildHtmlForDb(){
'format' => 'byte',
'description_function' => 'onClick'
),
1 => '<td class="tool"><input type="checkbox" name="selected_dbs[]" class="checkall" title="pma" value="pma" /></td><td class="name"> <a onclick="if (window.parent.openDb &amp;&amp; window.parent.openDb(\'pma\')) return false;" href="index.php?target=main.php&amp;db=pma" title="Jump to database" target="_parent"> pma</a></td><td class="value"><dfn title="">pma</dfn></td><td class="tool" style="text-align: center;"><span class="nowrap"><img src="s_cancel.png" title="Not replicated" alt="Not replicated" /></span></td><td class="tool"><a onclick="if (window.parent.setDb) window.parent.setDb(\'`pma`\');" href="server_privileges.php?target=main.php&amp;checkprivs=pma" title="Check privileges for database &quot;pma&quot;."> <span class="nowrap"><img src="s_rights.png" title="Check Privileges" alt="Check Privileges" /></span></a></td>'
1 => '<td class="tool"><input type="checkbox" name="selected_dbs[]" class="checkall" title="pma" value="pma" /></td><td class="name"> <a onclick="if (window.parent.openDb &amp;&amp; window.parent.openDb(\'pma\')) return false;" href="index.php?target=main.php&amp;db=pma" title="Jump to database" target="_parent"> pma</a></td><td class="value"><dfn title="">pma</dfn></td><td class="tool" style="text-align: center;"><span class="nowrap"><img src="s_cancel.png" title="Not replicated" alt="Not replicated" /></span></td>'
)
)
);
Expand Down
4 changes: 2 additions & 2 deletions test/libraries/rte/PMA_TRI_getQueryFromRequest_test.php
Expand Up @@ -74,8 +74,8 @@ public function provider()
'INSERT',
'table`2',
'SET @A=NULL',
'CREATE TRIGGER `trigger` BEFORE INSERT ON `table``2` FOR EACH ROW SET @A=NULL',
1
'CREATE TRIGGER `trigger` BEFORE INSERT ON FOR EACH ROW SET @A=NULL',
2
),
array(
'foo`s@host',
Expand Down

0 comments on commit 706205d

Please sign in to comment.