Skip to content
Snippets Groups Projects
Commit e0e51fd7 authored by Mitar's avatar Mitar
Browse files

Added tests.

parent 59511d97
No related branches found
No related tags found
No related merge requests found
...@@ -648,6 +648,26 @@ class RequestTest extends \Test\TestCase { ...@@ -648,6 +648,26 @@ class RequestTest extends \Test\TestCase {
$this->assertSame('http', $request->getServerProtocol()); $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() { public function testGetServerProtocolDefault() {
$this->config $this->config
->expects($this->once()) ->expects($this->once())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment