mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Unset test state in DirectorTest
This broke RSSFeedTest when running through 'sake'
This commit is contained in:
parent
4ef83a2895
commit
1d402dd513
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user