Updated unittest to conform latest update

This commit is contained in:
Herman van Rink
2010-08-23 14:30:17 +02:00
committed by Herman van Rink
parent 9369b8144e
commit 0aba4e12f0

View File

@@ -17,6 +17,7 @@ require_once 'PHPUnit/Extensions/OutputTestCase.php';
require_once './libraries/common.lib.php';
require_once './libraries/url_generating.lib.php';
require_once './libraries/core.lib.php';
require_once './libraries/select_lang.lib.php';
/**
* Test function sending headers.
@@ -246,22 +247,24 @@ class PMA_headerLocation_test extends PHPUnit_Extensions_OutputTestCase
// over 600 chars
$testUri = 'http://testurl.com/test.php?testlonguri=over600chars&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test&test=test';
$testUri_html = htmlspecialchars($testUri);
$testUri_js = PMA_escapeJsString($testUri);
$header = "<html><head><title>- - -</title>\n" .
"<meta http-equiv=\"expires\" content=\"0\">\n" .
"<meta http-equiv=\"Pragma\" content=\"no-cache\">\n" .
"<meta http-equiv=\"Cache-Control\" content=\"no-cache\">\n" .
"<meta http-equiv=\"Refresh\" content=\"0;url=" . $testUri . "\">\n" .
"<meta http-equiv=\"Refresh\" content=\"0;url=" . $testUri_html . "\">\n" .
"<script type=\"text/javascript\">\n".
"//<![CDATA[\n" .
"setTimeout(\"window.location = unescape('\"" . $testUri . "\"')\", 2000);\n" .
"setTimeout(\"window.location = unescape('\"" . $testUri_js . "\"')\", 2000);\n" .
"//]]>\n" .
"</script>\n" .
"</head>\n" .
"<body>\n" .
"<script type=\"text/javascript\">\n" .
"//<![CDATA[\n" .
"document.write('<p><a href=\"" . $testUri . "\">" . 'test link' . "</a></p>');\n" .
"document.write('<p><a href=\"" . $testUri_html . "\">" . 'test link' . "</a></p>');\n" .
"//]]>\n" .
"</script></body></html>\n";
@@ -280,7 +283,7 @@ class PMA_headerLocation_test extends PHPUnit_Extensions_OutputTestCase
$GLOBALS['reload'] = true;
$GLOBALS['db'] = 'test_db';
$url = './navigation.php?db='.$GLOBALS['db'];
$url = './navigation.php?db='.$GLOBALS['db'] . '&lang=en-utf-8&convcharset=utf-8';
$write = PHP_EOL . '<script type="text/javascript">' . PHP_EOL .
'//<![CDATA[' . PHP_EOL .
'if (typeof(window.parent) != \'undefined\'' . PHP_EOL .