public function testRequestFactorySchemeHeader()
{
$server = array('SERVER_NAME' => 'example.com', 'HTTP_HOST' => 'example.com', 'SERVER_PORT' => '80', 'REQUEST_URI' => 'http://example.com/', 'REQUEST_METHOD' => 'GET', 'HTTP_X_FORWARDED_PROTO' => 'https');
$factory = new Http\RequestFactory($server);
$factory->setSchemeHeader('X-Forwarded-Proto');
$request = $factory->create();
$this->assertEquals($request->getRequestMethod(), 'GET');
$this->assertEquals((string) $request->getUrl(), 'https://example.com/');
$this->assertEquals($request->getUrl()->getScheme(), 'https');
}