Advisor: mark that 'Rate of reading fixed position' may be wrong, requires further...
[phpmyadmin/thilanka.git] / test / libraries / common / PMA_getIcon_test.php
blob883a7b55a26aa84beade85e7f5a5559ad8baae32
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
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
9 */
12 * Include to test.
14 require_once 'libraries/common.lib.php';
16 class PMA_getIcon_test extends PHPUnit_Framework_TestCase
19 function testGetIconWithoutPropertiesIconic(){
21 $GLOBALS['cfg']['PropertiesIconic'] = false;
23 $this->assertEquals(
24 '<span class="nowrap"></span>',
25 PMA_getIcon('b_comment.png')
29 function testGetIconWithPropertiesIconic(){
31 $GLOBALS['cfg']['PropertiesIconic'] = true;
33 $this->assertEquals(
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';
44 $this->assertEquals(
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';
56 $this->assertEquals(
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)