From e0e51fd79fded941ce307e3b937e5f634b4e0550 Mon Sep 17 00:00:00 2001
From: Mitar <mitar.git@tnode.com>
Date: Fri, 27 Nov 2015 02:45:49 -0800
Subject: [PATCH] Added tests.

---
 tests/lib/appframework/http/RequestTest.php | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/tests/lib/appframework/http/RequestTest.php b/tests/lib/appframework/http/RequestTest.php
index ab5fe15444..92a2cc01dd 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())
-- 
GitLab