Defining undefined config

This commit is contained in:
Madhura Jayaratne 2011-10-02 02:10:15 +05:30
parent 383d55ff6d
commit aa4dac8175

View File

@ -20,6 +20,8 @@ class PMA_showPHPDocu_test extends PHPUnit_Framework_TestCase
function setup()
{
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$GLOBALS['server'] = 99;
$GLOBALS['cfg']['ServerDefault'] = 0;
}
function testShwoPHPDocuReplaceHelpImg()
@ -28,7 +30,7 @@ class PMA_showPHPDocu_test extends PHPUnit_Framework_TestCase
$target = "docu";
$lang = _pgettext('PHP documentation language', 'en');
$expected = '<a href="./url.php?url=http%3A%2F%2Fphp.net%2Fmanual%2F' . $lang . '%2F' . $target
$expected = '<a href="./url.php?url=http%3A%2F%2Fphp.net%2Fmanual%2F' . $lang . '%2F' . $target . '&amp;server=99'
. '" target="documentation"><img src="themes/dot.gif" title="'
. __('Documentation') . '" alt="' . __('Documentation') . '" class="icon ic_b_help" /></a>';
@ -41,7 +43,7 @@ class PMA_showPHPDocu_test extends PHPUnit_Framework_TestCase
$target = "docu";
$lang = _pgettext('PHP documentation language', 'en');
$expected = '[<a href="./url.php?url=http%3A%2F%2Fphp.net%2Fmanual%2F' . $lang . '%2F' . $target
$expected = '[<a href="./url.php?url=http%3A%2F%2Fphp.net%2Fmanual%2F' . $lang . '%2F' . $target . '&amp;server=99'
. '" target="documentation">' . __('Documentation') . '</a>]';
$this->assertEquals($expected, PMA_showPHPDocu($target));