You are here

public function FunctionsTest::testCanModifyRequestWithUri in Zircon Profile 8

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

File

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

Class

FunctionsTest

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testCanModifyRequestWithUri() {
  $r1 = new Psr7\Request('GET', 'http://foo.com');
  $r2 = Psr7\modify_request($r1, [
    'uri' => new Psr7\Uri('http://www.foo.com'),
  ]);
  $this
    ->assertEquals('http://www.foo.com', (string) $r2
    ->getUri());
  $this
    ->assertEquals('www.foo.com', (string) $r2
    ->getHeaderLine('host'));
}