You are here

public function FunctionsTest::testConvertsRequestsToStrings in Zircon Profile 8

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

File

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

Class

FunctionsTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testConvertsRequestsToStrings() {
  $request = new Psr7\Request('PUT', 'http://foo.com/hi?123', [
    'Baz' => 'bar',
    'Qux' => ' ipsum',
  ], 'hello', '1.0');
  $this
    ->assertEquals("PUT /hi?123 HTTP/1.0\r\nHost: foo.com\r\nBaz: bar\r\nQux: ipsum\r\n\r\nhello", Psr7\str($request));
}