summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMitar <mitar.git@tnode.com>2015-11-27 02:45:49 -0800
committerMitar <mitar.git@tnode.com>2015-11-27 02:45:49 -0800
commite0e51fd79fded941ce307e3b937e5f634b4e0550 (patch)
tree108adbeefb7abb95291b20a197bb3ac66c48475d /tests
parent59511d97ee4a93dd34bd56e0607f18d71edd7a9c (diff)
downloadnextcloud-server-e0e51fd79fded941ce307e3b937e5f634b4e0550.tar.gz
nextcloud-server-e0e51fd79fded941ce307e3b937e5f634b4e0550.zip
Added tests.
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())