You are here

public function RequestTest::testWithUri in Zircon Profile 8

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

File

vendor/guzzlehttp/psr7/tests/RequestTest.php, line 51

Class

RequestTest
@covers GuzzleHttp\Psr7\Request

Namespace

GuzzleHttp\Tests\Psr7

Code

public function testWithUri() {
  $r1 = new Request('GET', '/');
  $u1 = $r1
    ->getUri();
  $u2 = new Uri('http://www.example.com');
  $r2 = $r1
    ->withUri($u2);
  $this
    ->assertNotSame($r1, $r2);
  $this
    ->assertSame($u2, $r2
    ->getUri());
  $this
    ->assertSame($u1, $r1
    ->getUri());
}