Skip to content

Commit

Permalink
Merge pull request #3 from old-home/develop
Browse files Browse the repository at this point in the history
test: #2 Add Uri parse only path case
  • Loading branch information
t-terashima0815 authored Sep 5, 2023
2 parents 87de247 + 86412b6 commit f312185
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/units/Uri/UriTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@ public function testParseRootPath(): void
$this->assertSame('https://example.co.jp/', $uri->__toString());
}

public function testParseOnlyPath(): void
{
$uri = Uri::parse('/foo/bar');

$this->assertInstanceOf(Uri::class, $uri);
$this->assertSame('', $uri->getScheme());
$this->assertSame('', $uri->getUserInfo());
$this->assertSame('', $uri->getHost());
$this->assertSame(null, $uri->getPort());
$this->assertSame('', $uri->getAuthority());
$this->assertSame('/foo/bar', $uri->getPath());
$this->assertSame('', $uri->getQuery());
$this->assertSame('', $uri->getFragment());
$this->assertSame(':///foo/bar', $uri->__toString());
}

public function testGetAuthority(): void
{
$uri = new Uri(
Expand Down

0 comments on commit f312185

Please sign in to comment.