summaryrefslogtreecommitdiff
path: root/modules/comment/tests/Comment_Helper_Test.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-15 19:10:56 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-15 19:10:56 -0800
commit5a27ce7e8f3f90b20ba6aee7f83740776a82b578 (patch)
tree7f2dcaea36db0135961ba6ed1552a4cb4e1ebe38 /modules/comment/tests/Comment_Helper_Test.php
parentd12555de9a93945b4fffe4b0f8f477bfd1563568 (diff)
Save/restore $_SERVER before/after tests to avoid contamination.
Fix albums/photos tests to make sure we're really getting the HTTP_REFERER back.
Diffstat (limited to 'modules/comment/tests/Comment_Helper_Test.php')
-rw-r--r--modules/comment/tests/Comment_Helper_Test.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/comment/tests/Comment_Helper_Test.php b/modules/comment/tests/Comment_Helper_Test.php
index 9a8c83f1..82b7ebd2 100644
--- a/modules/comment/tests/Comment_Helper_Test.php
+++ b/modules/comment/tests/Comment_Helper_Test.php
@@ -24,6 +24,7 @@ class Comment_Helper_Test extends Unit_Test_Case {
public function setup() {
$this->_ip_address = Input::instance()->ip_address;
$this->_user_agent = Kohana::$user_agent;
+ $this->_save = $_SERVER;
$_SERVER["HTTP_ACCEPT"] = "HTTP_ACCEPT";
$_SERVER["HTTP_ACCEPT_CHARSET"] = "HTTP_ACCEPT_CHARSET";
@@ -42,6 +43,7 @@ class Comment_Helper_Test extends Unit_Test_Case {
public function teardown() {
Input::instance()->ip_address = $this->_ip_address;
Kohana::$user_agent = $this->_user_agent;
+ $_SERVER = $this->_save;
}
public function create_comment_for_guest_test() {