withScheme() public method

public withScheme ( $scheme )
Beispiel #1
0
 /**
  * @dataProvider invalidSchemes
  */
 public function testMutatingWithUnsupportedSchemeRaisesAnException($scheme)
 {
     $uri = new Uri('http://example.com');
     $this->setExpectedException('InvalidArgumentException', 'Unsupported scheme');
     $uri->withScheme($scheme);
 }
Beispiel #2
0
 /**
  * @group 48
  */
 public function testWithSchemeReturnsSameInstanceWhenSchemeDoesNotChange()
 {
     $uri = new Uri('http://example.com');
     $test = $uri->withScheme('http');
     $this->assertSame($uri, $test);
 }