Advisor: mark that 'Rate of reading fixed position' may be wrong, requires further...
[phpmyadmin/thilanka.git] / test / libraries / common / PMA_showPHPDocu_test.php
blobe2364d2ca16ab5c56c09ca8be6a61942f6f8c49b
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Test for PMA_showPHPDocu from common.lib.php
6 * @package phpMyAdmin-test
7 * @version $Id: PMA_showPHPDocu_test.php
8 * @group common.lib-tests
9 */
12 * Include to test.
14 require_once 'libraries/common.lib.php';
16 class PMA_showPHPDocu_test extends PHPUnit_Framework_TestCase
18 function testShwoPHPDocuReplaceHelpImg()
20 $GLOBALS['cfg']['ReplaceHelpImg'] = true;
22 $target = "docu";
23 $lang = _pgettext('PHP documentation language', 'en');
24 $expected = '<a href="http://php.net/manual/' . $lang . '/' . $target
25 . '" target="documentation"><img class="icon ic_b_help_s" src="themes/dot.gif" alt="'
26 . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
28 $this->assertEquals($expected, PMA_showPHPDocu($target));
31 function testShwoPHPDocuNotReplaceHelpImg()
33 $GLOBALS['cfg']['ReplaceHelpImg'] = false;
35 $target = "docu";
36 $lang = _pgettext('PHP documentation language', 'en');
37 $expected = '[<a href="http://php.net/manual/' . $lang . '/' . $target
38 . '" target="documentation">' . __('Documentation') . '</a>]';
40 $this->assertEquals($expected, PMA_showPHPDocu($target));