Unset test state in DirectorTest

This broke RSSFeedTest when running through 'sake'
This commit is contained in:
Ingo Schommer 2013-06-18 23:24:22 +02:00
parent 4ef83a2895
commit 1d402dd513

View File

@ -309,6 +309,8 @@ class DirectorTest extends SapphireTest {
'HTTP_X_FORWARDED_PROTOCOL', 'HTTPS', 'SSL' 'HTTP_X_FORWARDED_PROTOCOL', 'HTTPS', 'SSL'
); );
$origServer = $_SERVER;
foreach($headers as $header) { foreach($headers as $header) {
if(isset($_SERVER[$header])) { if(isset($_SERVER[$header])) {
unset($_SERVER['HTTP_X_FORWARDED_PROTOCOL']); unset($_SERVER['HTTP_X_FORWARDED_PROTOCOL']);
@ -339,6 +341,8 @@ class DirectorTest extends SapphireTest {
// https via SSL // https via SSL
$_SERVER['SSL'] = ''; $_SERVER['SSL'] = '';
$this->assertTrue(Director::is_https()); $this->assertTrue(Director::is_https());
$_SERVER = $origServer;
} }
} }