You are here

public function FunctionsTest::testParsesRequestMessagesWithHttpsScheme in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/tests/FunctionsTest.php \GuzzleHttp\Tests\Psr7\FunctionsTest::testParsesRequestMessagesWithHttpsScheme()

File

vendor/guzzlehttp/psr7/tests/FunctionsTest.php, line 252

Class

FunctionsTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testParsesRequestMessagesWithHttpsScheme() {
  $req = "PUT /abc?baz=bar HTTP/1.1\r\nHost: foo.com:443\r\n\r\n";
  $request = Psr7\parse_request($req);
  $this
    ->assertEquals('PUT', $request
    ->getMethod());
  $this
    ->assertEquals('/abc?baz=bar', $request
    ->getRequestTarget());
  $this
    ->assertEquals('1.1', $request
    ->getProtocolVersion());
  $this
    ->assertEquals('foo.com:443', $request
    ->getHeaderLine('Host'));
  $this
    ->assertEquals('', (string) $request
    ->getBody());
  $this
    ->assertEquals('https://foo.com/abc?baz=bar', (string) $request
    ->getUri());
}