diff options
author | Mitar <mitar.git@tnode.com> | 2015-11-27 02:45:49 -0800 |
---|---|---|
committer | Mitar <mitar.git@tnode.com> | 2015-11-27 02:45:49 -0800 |
commit | e0e51fd79fded941ce307e3b937e5f634b4e0550 (patch) | |
tree | 108adbeefb7abb95291b20a197bb3ac66c48475d /tests | |
parent | 59511d97ee4a93dd34bd56e0607f18d71edd7a9c (diff) | |
download | nextcloud-server-e0e51fd79fded941ce307e3b937e5f634b4e0550.tar.gz nextcloud-server-e0e51fd79fded941ce307e3b937e5f634b4e0550.zip |
Added tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/appframework/http/RequestTest.php | 20 |
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()) |