@@ -36,14 +36,14 @@ public function testNewInstance(): void
36
36
$ uri = new Uri (self ::$ uri );
37
37
38
38
$ 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:password@hostname.com: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:password@hostname.com:9090 ' , $ uri ->getAuthority ());
44
+ $ this ->assertSame ('/path ' , $ uri ->getPath ());
45
+ $ this ->assertSame ('arg=value ' , $ uri ->getQuery ());
46
+ $ this ->assertSame ('anchor ' , $ uri ->getFragment ());
47
47
}
48
48
49
49
/**
@@ -118,7 +118,7 @@ public function authorityProvider(): array
118
118
*/
119
119
public function testGetAuthority (string $ autority , string $ expected ): void
120
120
{
121
- $ this ->assertEquals ($ expected , (new Uri ("{$ autority }/path?arg=value#anchor " ))->getAuthority ());
121
+ $ this ->assertSame ($ expected , (new Uri ("{$ autority }/path?arg=value#anchor " ))->getAuthority ());
122
122
}
123
123
124
124
/**
@@ -146,7 +146,7 @@ public function portProvider(): array
146
146
*/
147
147
public function testGetPort (string $ scheme , string $ port , int $ expected ): void
148
148
{
149
- $ this ->assertEquals ($ expected , (new Uri ("{$ scheme }://username:password@hostname.com {$ port }/path?arg=value#anchor " ))->getPort ());
149
+ $ this ->assertSame ($ expected , ( int ) (new Uri ("{$ scheme }://username:password@hostname.com {$ port }/path?arg=value#anchor " ))->getPort ());
150
150
}
151
151
152
152
/**
@@ -158,7 +158,7 @@ public function testWithScheme(): void
158
158
{
159
159
$ uri = (new Uri (self ::$ uri ))->withScheme ('https ' );
160
160
161
- $ this ->assertEquals ('https ' , $ uri ->getScheme ());
161
+ $ this ->assertSame ('https ' , $ uri ->getScheme ());
162
162
}
163
163
164
164
/**
@@ -196,7 +196,7 @@ public function testWithUserInfo(): void
196
196
{
197
197
$ uri = (new Uri (self ::$ uri ))->withUserInfo ('testUser ' , 'password ' );
198
198
199
- $ this ->assertEquals ('testUser:password ' , $ uri ->getUserInfo ());
199
+ $ this ->assertSame ('testUser:password ' , $ uri ->getUserInfo ());
200
200
}
201
201
202
202
/**
@@ -208,7 +208,7 @@ public function testWithUserInfoWithoutPassword(): void
208
208
{
209
209
$ uri = (new Uri (self ::$ uri ))->withUserInfo ('testUser ' );
210
210
211
- $ this ->assertEquals ('testUser ' , $ uri ->getUserInfo ());
211
+ $ this ->assertSame ('testUser ' , $ uri ->getUserInfo ());
212
212
}
213
213
214
214
/**
@@ -220,7 +220,7 @@ public function testWithUserInfoWithoutUserAndPassword(): void
220
220
{
221
221
$ uri = (new Uri (self ::$ uri ))->withUserInfo ('' );
222
222
223
- $ this ->assertEquals ('' , $ uri ->getUserInfo ());
223
+ $ this ->assertSame ('' , $ uri ->getUserInfo ());
224
224
}
225
225
226
226
/**
@@ -232,7 +232,7 @@ public function testWithHost(): void
232
232
{
233
233
$ uri = (new Uri (self ::$ uri ))->withHost ('example.com ' );
234
234
235
- $ this ->assertEquals ('example.com ' , $ uri ->getHost ());
235
+ $ this ->assertSame ('example.com ' , $ uri ->getHost ());
236
236
}
237
237
238
238
/**
@@ -270,7 +270,7 @@ public function testWithPort(): void
270
270
{
271
271
$ uri = (new Uri (self ::$ uri ))->withPort (8080 );
272
272
273
- $ this ->assertEquals (8080 , $ uri ->getPort ());
273
+ $ this ->assertSame (8080 , $ uri ->getPort ());
274
274
}
275
275
276
276
/**
@@ -356,8 +356,8 @@ public function testWithPath(): void
356
356
{
357
357
$ uri = (new Uri (self ::$ uri ))->withPath ('/otherpath ' );
358
358
359
- $ this ->assertEquals ('/otherpath ' , $ uri ->getPath ());
360
- $ this ->assertEquals ('http://username:password@hostname.com:9090/otherpath?arg=value#anchor ' , (string ) $ uri );
359
+ $ this ->assertSame ('/otherpath ' , $ uri ->getPath ());
360
+ $ this ->assertSame ('http://username:password@hostname.com:9090/otherpath?arg=value#anchor ' , (string ) $ uri );
361
361
}
362
362
363
363
/**
@@ -432,7 +432,7 @@ public function uriProvider(): array
432
432
*/
433
433
public function testUriToString (string $ testUri ): void
434
434
{
435
- $ this ->assertEquals ($ testUri , (string ) (new Uri ($ testUri )));
435
+ $ this ->assertSame ($ testUri , (string ) (new Uri ($ testUri )));
436
436
}
437
437
438
438
/**
@@ -464,8 +464,8 @@ public function testWithQuery(string $withQuery, string $expectedQuery, string $
464
464
{
465
465
$ uri = (new Uri (self ::$ uri ))->withQuery ($ withQuery );
466
466
467
- $ this ->assertEquals ($ expectedQuery , $ uri ->getQuery ());
468
- $ this ->assertEquals ($ expectedUri , (string ) $ uri );
467
+ $ this ->assertSame ($ expectedQuery , $ uri ->getQuery ());
468
+ $ this ->assertSame ($ expectedUri , (string ) $ uri );
469
469
}
470
470
471
471
/**
@@ -523,8 +523,8 @@ public function testWithFragment(string $withFragment, string $expectedFragment,
523
523
{
524
524
$ uri = (new Uri (self ::$ uri ))->withFragment ($ withFragment );
525
525
526
- $ this ->assertEquals ($ expectedFragment , $ uri ->getFragment ());
527
- $ this ->assertEquals ($ expectedUri , (string ) $ uri );
526
+ $ this ->assertSame ($ expectedFragment , $ uri ->getFragment ());
527
+ $ this ->assertSame ($ expectedUri , (string ) $ uri );
528
528
}
529
529
530
530
/**
0 commit comments