public function UriTest::testAllowsFalseyUrlParts in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/psr7/tests/UriTest.php \GuzzleHttp\Tests\Psr7\UriTest::testAllowsFalseyUrlParts()
File
- vendor/
guzzlehttp/ psr7/ tests/ UriTest.php, line 87
Class
- UriTest
- @covers GuzzleHttp\Psr7\Uri
Namespace
GuzzleHttp\Tests\Psr7Code
public function testAllowsFalseyUrlParts() {
$url = new Uri('http://a:1/0?0#0');
$this
->assertSame('a', $url
->getHost());
$this
->assertEquals(1, $url
->getPort());
$this
->assertSame('/0', $url
->getPath());
$this
->assertEquals('0', (string) $url
->getQuery());
$this
->assertSame('0', $url
->getFragment());
$this
->assertEquals('http://a:1/0?0#0', (string) $url);
$url = new Uri('');
$this
->assertSame('', (string) $url);
$url = new Uri('0');
$this
->assertSame('0', (string) $url);
$url = new Uri('/');
$this
->assertSame('/', (string) $url);
}