2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Test for PMA_getIcon() from common.lib.php
6 * @package phpMyAdmin-test
7 * @version $Id: PMA_getIcon_test.php
8 * @group common.lib-tests
14 require_once 'libraries/common.lib.php';
16 class PMA_getIcon_test
extends PHPUnit_Framework_TestCase
19 function testGetIconWithoutPropertiesIconic(){
21 $GLOBALS['cfg']['PropertiesIconic'] = false;
24 '<span class="nowrap"></span>',
25 PMA_getIcon('b_comment.png')
29 function testGetIconWithPropertiesIconic(){
31 $GLOBALS['cfg']['PropertiesIconic'] = true;
34 '<span class="nowrap"><img src="themes/dot.gif" title="" alt="" class="icon ic_b_comment" /></span>',
35 PMA_getIcon('b_comment.png')
39 function testGetIconAlternate(){
41 $GLOBALS['cfg']['PropertiesIconic'] = true;
42 $alternate_text = 'alt_str';
45 '<span class="nowrap"><img src="themes/dot.gif" title="' . $alternate_text . '" alt="' . $alternate_text
46 . '" class="icon ic_b_comment" /></span>',
47 PMA_getIcon('b_comment.png', $alternate_text)
51 function testGetIconWithForceText(){
53 $GLOBALS['cfg']['PropertiesIconic'] = true;
54 $alternate_text = 'alt_str';
57 '<span class="nowrap"><img src="themes/dot.gif" title="' . $alternate_text . '" alt="' . $alternate_text
58 . '" class="icon ic_b_comment" /> ' . $alternate_text . '</span>',
59 PMA_getIcon('b_comment.png', $alternate_text, true)