assertEquals(
'',
PMA\libraries\Util::getIcon('b_comment.png')
);
}
/**
* Test for getIcon
*
* @return void
*/
function testGetIconWithActionLinksMode()
{
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$this->assertEquals(
'',
PMA\libraries\Util::getIcon('b_comment.png')
);
}
/**
* Test for getIcon
*
* @return void
*/
function testGetIconAlternate()
{
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$alternate_text = 'alt_str';
$this->assertEquals(
'',
PMA\libraries\Util::getIcon('b_comment.png', $alternate_text)
);
}
/**
* Test for getIcon
*
* @return void
*/
function testGetIconWithForceText()
{
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$alternate_text = 'alt_str';
// Here we are checking for an icon embedded inside a span (i.e not a menu
// bar icon
$this->assertEquals(
' ' . $alternate_text . '',
PMA\libraries\Util::getIcon('b_comment.png', $alternate_text, true, false)
);
}
}