Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Fix to make withPort fully compliant with PSR-7 #96

Merged
merged 5 commits into from Oct 15, 2015
Merged

Fix to make withPort fully compliant with PSR-7 #96

merged 5 commits into from Oct 15, 2015

Conversation

ghost
Copy link

@ghost ghost commented Oct 14, 2015

withPort should allow null port

withPort should allow null port
@Maks3w
Copy link
Member

Maks3w commented Oct 14, 2015

Missing test

@weierophinney weierophinney merged commit 794db58 into zendframework:master Oct 15, 2015
weierophinney added a commit that referenced this pull request Oct 15, 2015
Fix to make withPort fully compliant with PSR-7
weierophinney added a commit that referenced this pull request Oct 15, 2015
weierophinney added a commit that referenced this pull request Oct 15, 2015
weierophinney added a commit that referenced this pull request Oct 15, 2015
@weierophinney weierophinney added this to the 1.1.4 milestone Oct 15, 2015
@weierophinney weierophinney self-assigned this Oct 15, 2015
@@ -88,7 +89,7 @@ public function testWithPortReturnsNewInstanceWithProvidedPort($port)
$this->assertNotSame($uri, $new);
$this->assertEquals($port, $new->getPort());
$this->assertEquals(
sprintf('https://user:pass@local.example.com:%d/foo?bar=baz#quz', $port),
sprintf('https://user:pass@local.example.com%s/foo?bar=baz#quz', $port === null ? '' : ':'.$port),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its preferible provide the expected values as part of the data provider. What test verify this branch of logic test as expected?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants