-
Notifications
You must be signed in to change notification settings - Fork 8k
Reorganize ext/uri tests - equivalence #20391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
22fb6bc
Reorganize ext/uri tests - equivalence
kocsismate b4099c1
Adjust tests according to cod review
kocsismate 034b481
Remove unneessary test
kocsismate 4588860
Clean up tests and test names
kocsismate b5256e7
Fix test assertion
kocsismate 8b3c01f
Address review comments
kocsismate 58be97a
Same path
kocsismate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns false - host is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("https://user:info@192.168.0.1:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns false - path is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar/baz?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns false - port is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:442/foo/bar?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns false - query is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
15 changes: 15 additions & 0 deletions
15
ext/uri/tests/rfc3986/equivalence/equals_false_query2.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns false - query differs in casing | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?ABC=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
15 changes: 15 additions & 0 deletions
15
ext/uri/tests/rfc3986/equivalence/equals_false_scheme.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns false - scheme is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("http://user@example.com:443/foo/bar/baz?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) | ||
15 changes: 15 additions & 0 deletions
15
ext/uri/tests/rfc3986/equivalence/equals_false_userinfo.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns false - userinfo is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("https://user@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
20 changes: 20 additions & 0 deletions
20
ext/uri/tests/rfc3986/equivalence/equals_fragment_different.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - different fragment - include fragment variation | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hash"); | ||
|
|
||
| var_dump($uri1->equals($uri2, Uri\UriComparisonMode::IncludeFragment)); | ||
| var_dump($uri2->equals($uri1, Uri\UriComparisonMode::IncludeFragment)); | ||
|
|
||
| var_dump($uri1->equals($uri2, Uri\UriComparisonMode::ExcludeFragment)); | ||
| var_dump($uri2->equals($uri1, Uri\UriComparisonMode::ExcludeFragment)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) | ||
| bool(true) | ||
| bool(true) |
20 changes: 20 additions & 0 deletions
20
ext/uri/tests/rfc3986/equivalence/equals_true_identical.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns true - identical URIs | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2, Uri\UriComparisonMode::IncludeFragment)); | ||
| var_dump($uri2->equals($uri1, Uri\UriComparisonMode::IncludeFragment)); | ||
|
|
||
| var_dump($uri1->equals($uri2, Uri\UriComparisonMode::ExcludeFragment)); | ||
| var_dump($uri2->equals($uri1, Uri\UriComparisonMode::ExcludeFragment)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(true) | ||
| bool(true) | ||
| bool(true) | ||
| bool(true) |
15 changes: 15 additions & 0 deletions
15
ext/uri/tests/rfc3986/equivalence/equals_true_normalization1.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns true - after multiple normalization steps | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = Uri\Rfc3986\Uri::parse("https://user:info@example%2ecom:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $uri2 = Uri\Rfc3986\Uri::parse("HTTPS://user:info@EXAMPLE.COM:0443/../foo/b%61r?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(true) | ||
| bool(true) |
15 changes: 15 additions & 0 deletions
15
ext/uri/tests/rfc3986/equivalence/equals_true_normalization2.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\Rfc3986\Uri equivalence - returns true - after IPv6 normalization | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $uri1 = new Uri\Rfc3986\Uri("https://[2001:0db8:0001:0000:0000:0ab9:C0A8:0102]"); | ||
| $uri2 = new Uri\Rfc3986\Uri("https://[2001:DB8:1::AB9:C0A8:102]"); | ||
|
|
||
| var_dump($uri1->equals($uri2)); | ||
| var_dump($uri2->equals($uri1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(true) | ||
| bool(true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns false - host is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("https://user:pass@192.168.0.1:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($url1->equals($url2)); | ||
| var_dump($url2->equals($url1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
15 changes: 15 additions & 0 deletions
15
ext/uri/tests/whatwg/equivalence/equals_false_password.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns false - password is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("https://user:@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($url1->equals($url2)); | ||
| var_dump($url2->equals($url1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns false - path is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar/baz?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($url1->equals($url2)); | ||
| var_dump($url2->equals($url1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
15 changes: 15 additions & 0 deletions
15
ext/uri/tests/whatwg/equivalence/equals_false_path_percent_encoded.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns false - path is not percent-decoded during normalization | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = new Uri\WhatWg\Url("https://example.com/foo/bar"); | ||
| $url2 = new Uri\WhatWg\Url("https://example.com/foo/b%61r"); | ||
|
|
||
| var_dump($url1->equals($url2)); | ||
| var_dump($url2->equals($url1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns false - port is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("https://user:pass@example.com:442/foo/bar?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($url1->equals($url2)); | ||
| var_dump($url2->equals($url1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns false - query is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?abc=123#hashmark"); | ||
|
|
||
| var_dump($url1->equals($url2)); | ||
| var_dump($url2->equals($url1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns false - query differs in casing | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?ABC=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($url1->equals($url2)); | ||
| var_dump($url2->equals($url1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns false - user is different | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:pass@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("http://usr:pass@example.com:443/foo/bar/baz?abc=123&def=ghi#hashmark"); | ||
|
TimWolla marked this conversation as resolved.
Outdated
|
||
|
|
||
| var_dump($url1->equals($url2)); | ||
| var_dump($url2->equals($url1)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) | ||
20 changes: 20 additions & 0 deletions
20
ext/uri/tests/whatwg/equivalence/equals_fragment_different.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - different fragment - include fragment variation | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hash"); | ||
|
|
||
| var_dump($url1->equals($url2, Uri\UriComparisonMode::IncludeFragment)); | ||
| var_dump($url2->equals($url1, Uri\UriComparisonMode::IncludeFragment)); | ||
|
|
||
| var_dump($url1->equals($url2, Uri\UriComparisonMode::ExcludeFragment)); | ||
| var_dump($url2->equals($url1, Uri\UriComparisonMode::ExcludeFragment)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(false) | ||
| bool(false) | ||
| bool(true) | ||
| bool(true) |
20 changes: 20 additions & 0 deletions
20
ext/uri/tests/whatwg/equivalence/equals_true_identical.phpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --TEST-- | ||
| Test Uri\WhatWg\Url equivalence - returns true - identical URIs | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| $url1 = Uri\WhatWg\Url::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
| $url2 = Uri\WhatWg\Url::parse("https://user:info@example.com:443/foo/bar?abc=123&def=ghi#hashmark"); | ||
|
|
||
| var_dump($url1->equals($url2, Uri\UriComparisonMode::IncludeFragment)); | ||
| var_dump($url2->equals($url1, Uri\UriComparisonMode::IncludeFragment)); | ||
|
|
||
| var_dump($url1->equals($url2, Uri\UriComparisonMode::ExcludeFragment)); | ||
| var_dump($url2->equals($url1, Uri\UriComparisonMode::ExcludeFragment)); | ||
|
|
||
| ?> | ||
| --EXPECT-- | ||
| bool(true) | ||
| bool(true) | ||
| bool(true) | ||
| bool(true) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.