Skip to content

Commit 781fdad

Browse files
committed
Add tests for PHP-extras
1 parent 8e5eabf commit 781fdad

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
$GLOBALS
2+
$_SERVER
3+
$_GET
4+
$_POST
5+
$_FILES
6+
$_REQUEST
7+
$_SESSION
8+
$_ENV
9+
$_COOKIE
10+
$php_errormsg
11+
$HTTP_RAW_POST_DATA
12+
$http_response_header
13+
$argc
14+
$argv
15+
16+
----------------------------------------------------
17+
18+
[
19+
["global", "$GLOBALS"],
20+
["global", "$_SERVER"],
21+
["global", "$_GET"],
22+
["global", "$_POST"],
23+
["global", "$_FILES"],
24+
["global", "$_REQUEST"],
25+
["global", "$_SESSION"],
26+
["global", "$_ENV"],
27+
["global", "$_COOKIE"],
28+
["global", "$php_errormsg"],
29+
["global", "$HTTP_RAW_POST_DATA"],
30+
["global", "$http_response_header"],
31+
["global", "$argc"],
32+
["global", "$argv"]
33+
]
34+
35+
----------------------------------------------------
36+
37+
Checks for superglobals.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
static::foo()
2+
self::bar()
3+
parent::baz()
4+
5+
----------------------------------------------------
6+
7+
[
8+
["scope", [
9+
["keyword", "static"],
10+
["punctuation", "::"]
11+
]],
12+
["function", "foo"], ["punctuation", "("], ["punctuation", ")"],
13+
["scope", [
14+
["keyword", "self"],
15+
["punctuation", "::"]
16+
]],
17+
["function", "bar"], ["punctuation", "("], ["punctuation", ")"],
18+
["scope", [
19+
["keyword", "parent"],
20+
["punctuation", "::"]
21+
]],
22+
["function", "baz"], ["punctuation", "("], ["punctuation", ")"]
23+
]
24+
25+
----------------------------------------------------
26+
27+
Checks for scopes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
$this
2+
3+
----------------------------------------------------
4+
5+
[
6+
["this", "$this"]
7+
]
8+
9+
----------------------------------------------------
10+
11+
Checks for $this.

0 commit comments

Comments
 (0)