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

Commit b9e3c90

Browse files
committed
Use assertSame to ensure return value is of same type
Changes `assertEquals(3001, $new->getPort())` to `assertSame(3001, $new->getPort())`, which better tests that the return value is of the expected type, as well as value.
1 parent e63156a commit b9e3c90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/UriTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function testWithPortReturnsSameInstanceWithProvidedPortIsSameAsBefore()
161161
$uri = new Uri('https://user:[email protected]:3001/foo?bar=baz#quz');
162162
$new = $uri->withPort('3001');
163163
$this->assertSame($uri, $new);
164-
$this->assertEquals(3001, $new->getPort());
164+
$this->assertSame(3001, $new->getPort());
165165
}
166166

167167
public function invalidPorts()

0 commit comments

Comments
 (0)