summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/appframework/http/RequestTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lib/appframework/http/RequestTest.php b/tests/lib/appframework/http/RequestTest.php
index ab5fe154441..92a2cc01dd2 100644
--- a/tests/lib/appframework/http/RequestTest.php
+++ b/tests/lib/appframework/http/RequestTest.php
@@ -648,6 +648,26 @@ class RequestTest extends \Test\TestCase {
$this->assertSame('http', $request->getServerProtocol());
}
+ public function testGetServerProtocolWithHttpsServerValueEmpty() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('overwriteprotocol')
+ ->will($this->returnValue(''));
+
+ $request = new Request(
+ [
+ 'server' => [
+ 'HTTPS' => ''
+ ],
+ ],
+ $this->secureRandom,
+ $this->config,
+ $this->stream
+ );
+ $this->assertSame('http', $request->getServerProtocol());
+ }
+
public function testGetServerProtocolDefault() {
$this->config
->expects($this->once())