@@ -36,14 +36,14 @@ public function testNewInstance(): void
3636 $ uri = new Uri (self ::$ uri );
3737
3838 $ this ->assertInstanceOf (Uri::class, $ uri );
39- $ this ->assertEquals ('http ' , $ uri ->getScheme ());
40- $ this ->assertEquals ('username:password ' , $ uri ->getUserInfo ());
41- $ this ->assertEquals ('hostname.com ' , $ uri ->getHost ());
42- $ this ->assertEquals (9090 , $ uri ->getPort ());
43- $ this ->
assertEquals (
'username:[email protected] :9090 ' ,
$ uri->
getAuthority ());
44- $ this ->assertEquals ('/path ' , $ uri ->getPath ());
45- $ this ->assertEquals ('arg=value ' , $ uri ->getQuery ());
46- $ this ->assertEquals ('anchor ' , $ uri ->getFragment ());
39+ $ this ->assertSame ('http ' , $ uri ->getScheme ());
40+ $ this ->assertSame ('username:password ' , $ uri ->getUserInfo ());
41+ $ this ->assertSame ('hostname.com ' , $ uri ->getHost ());
42+ $ this ->assertSame (9090 , $ uri ->getPort ());
43+ $ this ->
assertSame (
'username:[email protected] :9090 ' ,
$ uri->
getAuthority ());
44+ $ this ->assertSame ('/path ' , $ uri ->getPath ());
45+ $ this ->assertSame ('arg=value ' , $ uri ->getQuery ());
46+ $ this ->assertSame ('anchor ' , $ uri ->getFragment ());
4747 }
4848
4949 /**
@@ -118,7 +118,7 @@ public function authorityProvider(): array
118118 */
119119 public function testGetAuthority (string $ autority , string $ expected ): void
120120 {
121- $ this ->assertEquals ($ expected , (new Uri ("{$ autority }/path?arg=value#anchor " ))->getAuthority ());
121+ $ this ->assertSame ($ expected , (new Uri ("{$ autority }/path?arg=value#anchor " ))->getAuthority ());
122122 }
123123
124124 /**
@@ -146,7 +146,7 @@ public function portProvider(): array
146146 */
147147 public function testGetPort (string $ scheme , string $ port , int $ expected ): void
148148 {
149- $ this ->
assertEquals (
$ expected, (
new Uri (
"{$ scheme }://username:[email protected] {$ port }/path?arg=value#anchor " ))->
getPort ());
149+ $ this ->
assertSame (
$ expected,
( int ) (
new Uri (
"{$ scheme }://username:[email protected] {$ port }/path?arg=value#anchor " ))->
getPort ());
150150 }
151151
152152 /**
@@ -158,7 +158,7 @@ public function testWithScheme(): void
158158 {
159159 $ uri = (new Uri (self ::$ uri ))->withScheme ('https ' );
160160
161- $ this ->assertEquals ('https ' , $ uri ->getScheme ());
161+ $ this ->assertSame ('https ' , $ uri ->getScheme ());
162162 }
163163
164164 /**
@@ -196,7 +196,7 @@ public function testWithUserInfo(): void
196196 {
197197 $ uri = (new Uri (self ::$ uri ))->withUserInfo ('testUser ' , 'password ' );
198198
199- $ this ->assertEquals ('testUser:password ' , $ uri ->getUserInfo ());
199+ $ this ->assertSame ('testUser:password ' , $ uri ->getUserInfo ());
200200 }
201201
202202 /**
@@ -208,7 +208,7 @@ public function testWithUserInfoWithoutPassword(): void
208208 {
209209 $ uri = (new Uri (self ::$ uri ))->withUserInfo ('testUser ' );
210210
211- $ this ->assertEquals ('testUser ' , $ uri ->getUserInfo ());
211+ $ this ->assertSame ('testUser ' , $ uri ->getUserInfo ());
212212 }
213213
214214 /**
@@ -220,7 +220,7 @@ public function testWithUserInfoWithoutUserAndPassword(): void
220220 {
221221 $ uri = (new Uri (self ::$ uri ))->withUserInfo ('' );
222222
223- $ this ->assertEquals ('' , $ uri ->getUserInfo ());
223+ $ this ->assertSame ('' , $ uri ->getUserInfo ());
224224 }
225225
226226 /**
@@ -232,7 +232,7 @@ public function testWithHost(): void
232232 {
233233 $ uri = (new Uri (self ::$ uri ))->withHost ('example.com ' );
234234
235- $ this ->assertEquals ('example.com ' , $ uri ->getHost ());
235+ $ this ->assertSame ('example.com ' , $ uri ->getHost ());
236236 }
237237
238238 /**
@@ -270,7 +270,7 @@ public function testWithPort(): void
270270 {
271271 $ uri = (new Uri (self ::$ uri ))->withPort (8080 );
272272
273- $ this ->assertEquals (8080 , $ uri ->getPort ());
273+ $ this ->assertSame (8080 , $ uri ->getPort ());
274274 }
275275
276276 /**
@@ -356,8 +356,8 @@ public function testWithPath(): void
356356 {
357357 $ uri = (new Uri (self ::$ uri ))->withPath ('/otherpath ' );
358358
359- $ this ->assertEquals ('/otherpath ' , $ uri ->getPath ());
360- $ this ->
assertEquals (
'http://username:[email protected] :9090/otherpath?arg=value#anchor ' , (
string )
$ uri);
359+ $ this ->assertSame ('/otherpath ' , $ uri ->getPath ());
360+ $ this ->
assertSame (
'http://username:[email protected] :9090/otherpath?arg=value#anchor ' , (
string )
$ uri);
361361 }
362362
363363 /**
@@ -432,7 +432,7 @@ public function uriProvider(): array
432432 */
433433 public function testUriToString (string $ testUri ): void
434434 {
435- $ this ->assertEquals ($ testUri , (string ) (new Uri ($ testUri )));
435+ $ this ->assertSame ($ testUri , (string ) (new Uri ($ testUri )));
436436 }
437437
438438 /**
@@ -464,8 +464,8 @@ public function testWithQuery(string $withQuery, string $expectedQuery, string $
464464 {
465465 $ uri = (new Uri (self ::$ uri ))->withQuery ($ withQuery );
466466
467- $ this ->assertEquals ($ expectedQuery , $ uri ->getQuery ());
468- $ this ->assertEquals ($ expectedUri , (string ) $ uri );
467+ $ this ->assertSame ($ expectedQuery , $ uri ->getQuery ());
468+ $ this ->assertSame ($ expectedUri , (string ) $ uri );
469469 }
470470
471471 /**
@@ -523,8 +523,8 @@ public function testWithFragment(string $withFragment, string $expectedFragment,
523523 {
524524 $ uri = (new Uri (self ::$ uri ))->withFragment ($ withFragment );
525525
526- $ this ->assertEquals ($ expectedFragment , $ uri ->getFragment ());
527- $ this ->assertEquals ($ expectedUri , (string ) $ uri );
526+ $ this ->assertSame ($ expectedFragment , $ uri ->getFragment ());
527+ $ this ->assertSame ($ expectedUri , (string ) $ uri );
528528 }
529529
530530 /**
0 commit comments