public function testHttpStrictHostCheck()
{
$this->specify("http host with strict param does not return does not return valid host name", function () {
$request = $this->getRequestObject();
$request->setStrictHostCheck(true);
$this->setServerVar('SERVER_NAME', 'LOCALHOST:80');
expect($request->getHttpHost())->equals('localhost');
});
$this->specify("http host with strict param does not return does not return valid host name", function () {
$request = $this->getRequestObject();
$request->setStrictHostCheck(false);
$this->setServerVar('SERVER_NAME', 'LOCALHOST:80');
expect($request->getHttpHost())->equals('LOCALHOST:80');
});
$this->specify("The Request::isStrictHostCheck does not return expected value", function () {
$request = $this->getRequestObject();
expect($request->isStrictHostCheck())->false();
$request->setStrictHostCheck(true);
expect($request->isStrictHostCheck())->true();
$request->setStrictHostCheck(false);
expect($request->isStrictHostCheck())->false();
});
}