diff --git a/test/classes/PMA_Footer_test.php b/test/classes/PMA_Footer_test.php index 9acefe9c5d..698c220ddc 100644 --- a/test/classes/PMA_Footer_test.php +++ b/test/classes/PMA_Footer_test.php @@ -10,6 +10,7 @@ */ require_once 'libraries/Footer.class.php'; +require_once 'libraries/Response.class.php'; require_once 'libraries/js_escape.lib.php'; require_once 'libraries/core.lib.php'; require_once 'libraries/url_generating.lib.php'; @@ -46,6 +47,9 @@ class PMA_Footer_Test extends PHPUnit_Framework_TestCase */ protected function setUp() { + $_SERVER['SCRIPT_NAME'] = 'index.php'; + $GLOBALS['db'] = 'mysql'; + $GLOBALS['table'] = ''; $GLOBALS['lang'] = 'en'; $GLOBALS['collation_connection'] = 'utf8_general_ci'; $GLOBALS['cfg']['Error_Handler']['gather'] = false; @@ -134,10 +138,12 @@ class PMA_Footer_Test extends PHPUnit_Framework_TestCase $GLOBALS['cfg']['ServerDefault'] = 1; $this->assertEquals( - '', + '', $this->_callPrivateFunction( '_getSelfLink', - array('db=mysql&token=1234') + array( + $this->object->getSelfUrl() + ) ) ); } @@ -156,10 +162,12 @@ class PMA_Footer_Test extends PHPUnit_Framework_TestCase $GLOBALS['pmaThemeImage'] = 'image'; $this->assertEquals( - '', + '', $this->_callPrivateFunction( '_getSelfLink', - array('db=mysql&token=1234') + array( + $this->object->getSelfUrl() + ) ) ); }