Skip to content

Commit 6f7f7a6

Browse files
committed
Reorganize ext/uri tests - parsing
1 parent 0b974dd commit 6f7f7a6

File tree

113 files changed

+2129
-1289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2129
-1289
lines changed

β€Žext/uri/tests/003.phptβ€Ž

Lines changed: 0 additions & 91 deletions
This file was deleted.

β€Žext/uri/tests/004.phptβ€Ž

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ uri
55
--FILE--
66
<?php
77

8-
var_dump(new Uri\Rfc3986\Uri(""));
9-
var_dump(Uri\Rfc3986\Uri::parse(""));
10-
11-
try {
12-
new Uri\WhatWg\Url("");
13-
} catch (Uri\WhatWg\InvalidUrlException $e) {
14-
echo $e->getMessage() . "\n";
15-
}
16-
17-
var_dump(Uri\WhatWg\Url::parse(""));
18-
198
var_dump(Uri\Rfc3986\Uri::parse("192.168/contact.html"));
209
var_dump(Uri\WhatWg\Url::parse("192.168/contact.html", null));
2110

@@ -24,44 +13,6 @@ var_dump(Uri\WhatWg\Url::parse("http://RuPaul's Drag Race All Stars 7 Winners Ca
2413

2514
?>
2615
--EXPECTF--
27-
object(Uri\Rfc3986\Uri)#%d (%d) {
28-
["scheme"]=>
29-
NULL
30-
["username"]=>
31-
NULL
32-
["password"]=>
33-
NULL
34-
["host"]=>
35-
NULL
36-
["port"]=>
37-
NULL
38-
["path"]=>
39-
string(0) ""
40-
["query"]=>
41-
NULL
42-
["fragment"]=>
43-
NULL
44-
}
45-
object(Uri\Rfc3986\Uri)#%d (%d) {
46-
["scheme"]=>
47-
NULL
48-
["username"]=>
49-
NULL
50-
["password"]=>
51-
NULL
52-
["host"]=>
53-
NULL
54-
["port"]=>
55-
NULL
56-
["path"]=>
57-
string(0) ""
58-
["query"]=>
59-
NULL
60-
["fragment"]=>
61-
NULL
62-
}
63-
The specified URI is malformed (MissingSchemeNonRelativeUrl)
64-
NULL
6516
object(Uri\Rfc3986\Uri)#%d (%d) {
6617
["scheme"]=>
6718
NULL

β€Žext/uri/tests/005.phptβ€Ž

Lines changed: 0 additions & 41 deletions
This file was deleted.

β€Žext/uri/tests/006.phptβ€Ž

Lines changed: 0 additions & 51 deletions
This file was deleted.

β€Žext/uri/tests/007.phptβ€Ž

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ uri
55
--FILE--
66
<?php
77

8-
try {
9-
new Uri\Rfc3986\Uri("https://example.com:8080@username:password/path?q=r#fragment");
10-
} catch (Uri\InvalidUriException $e) {
11-
echo $e->getMessage() . "\n";
12-
}
13-
148
try {
159
new Uri\WhatWg\Url("https://example.com:8080@username:password/path?q=r#fragment");
1610
} catch (Uri\WhatWg\InvalidUrlException $e) {
@@ -25,7 +19,6 @@ var_dump($failures);
2519

2620
?>
2721
--EXPECTF--
28-
The specified URI is malformed
2922
The specified URI is malformed (PortInvalid)
3023
array(%d) {
3124
[0]=>

β€Žext/uri/tests/009.phptβ€Ž

Lines changed: 0 additions & 48 deletions
This file was deleted.

β€Žext/uri/tests/012.phptβ€Ž

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ uri
88
var_dump(Uri\Rfc3986\Uri::parse("mailto:[email protected]"));
99
var_dump(Uri\WhatWg\Url::parse("mailto:[email protected]"));
1010

11-
var_dump(Uri\Rfc3986\Uri::parse("file:///E:/Documents%20and%20Settings"));
1211
var_dump(Uri\WhatWg\Url::parse("file:///E:\\Documents and Settings"));
1312

1413
?>
@@ -49,24 +48,6 @@ object(Uri\WhatWg\Url)#%d (%d) {
4948
["fragment"]=>
5049
NULL
5150
}
52-
object(Uri\Rfc3986\Uri)#%d (%d) {
53-
["scheme"]=>
54-
string(4) "file"
55-
["username"]=>
56-
NULL
57-
["password"]=>
58-
NULL
59-
["host"]=>
60-
string(0) ""
61-
["port"]=>
62-
NULL
63-
["path"]=>
64-
string(30) "/E:/Documents%20and%20Settings"
65-
["query"]=>
66-
NULL
67-
["fragment"]=>
68-
NULL
69-
}
7051
object(Uri\WhatWg\Url)#%d (%d) {
7152
["scheme"]=>
7253
string(4) "file"

β€Žext/uri/tests/019.phptβ€Ž

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ uri
55
--FILE--
66
<?php
77

8-
$uri = Uri\Rfc3986\Uri::parse("🐘");
9-
var_dump($uri);
10-
11-
$errors = [];
12-
$url = Uri\WhatWg\Url::parse("🐘", null, $errors);
13-
var_dump($url);
14-
var_dump($errors);
15-
168
$uri = Uri\Rfc3986\Uri::parse("https://🐘.com/🐘?🐘=🐘");
179
var_dump($uri);
1810

@@ -26,20 +18,7 @@ var_dump($url->toUnicodeString());
2618
?>
2719
--EXPECTF--
2820
NULL
29-
NULL
30-
array(1) {
31-
[0]=>
32-
object(Uri\WhatWg\UrlValidationError)#%d (%d) {
33-
["context"]=>
34-
string(4) "🐘"
35-
["type"]=>
36-
enum(Uri\WhatWg\UrlValidationErrorType::MissingSchemeNonRelativeUrl)
37-
["failure"]=>
38-
bool(true)
39-
}
40-
}
41-
NULL
42-
object(Uri\WhatWg\Url)#%d (%d) {
21+
object(Uri\WhatWg\Url)#1 (8) {
4322
["scheme"]=>
4423
string(5) "https"
4524
["username"]=>

0 commit comments

Comments
Β (0)