diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2016-02-23 15:03:52 +0300 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2016-02-23 15:03:52 +0300 |
commit | ada984c84d53195bbbf037a56d35bad6e8cd03ec (patch) | |
tree | 2293d77ad5a3bc5c4cccc6de177b09129cb527aa /test/classes/SanitizeTest.php | |
parent | 5a8db3e65f8c45486326b357a5c7def7b10b0360 (diff) |
You should reset the GLOBALS you are unsetting
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'test/classes/SanitizeTest.php')
-rw-r--r-- | test/classes/SanitizeTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/classes/SanitizeTest.php b/test/classes/SanitizeTest.php index 4a73381ec0..d22eb4c871 100644 --- a/test/classes/SanitizeTest.php +++ b/test/classes/SanitizeTest.php @@ -46,6 +46,10 @@ class SanitizeTest extends PHPUnit_Framework_TestCase */ public function testLink() { + $server = $GLOBALS['server']; + $lang = $GLOBALS['lang']; + $collation_connection = $GLOBALS['collation_connection']; + unset($GLOBALS['server']); unset($GLOBALS['lang']); unset($GLOBALS['collation_connection']); @@ -53,6 +57,10 @@ class SanitizeTest extends PHPUnit_Framework_TestCase '<a href="./url.php?url=http%3A%2F%2Fwww.phpmyadmin.net%2F" target="target">link</a>', Sanitize::sanitize('[a@http://www.phpmyadmin.net/@target]link[/a]') ); + + $GLOBALS['server'] = $server; + $GLOBALS['lang'] = $lang; + $GLOBALS['collation_connection'] = $collation_connection; } /** |