Added tests.
This commit is contained in:
parent
59511d97ee
commit
e0e51fd79f
|
@ -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())
|
||||||
|
|
Loading…
Reference in New Issue