File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed
test/php/net/xp_framework/unittest/core Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 31
31
with :
32
32
php-version : ${{ matrix.php-versions }}
33
33
extensions : com_dotnet
34
- ini-values : date.timezone=Europe/Berlin, variables_order=EGPCS
34
+ ini-values : date.timezone=Europe/Berlin
35
35
36
36
- name : Setup Problem Matchers for PHP
37
37
run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ abstract class Environment {
14
14
* @return bool
15
15
*/
16
16
private static function xdgCompliant () {
17
- foreach ($ _ENV as $ name => $ value ) {
17
+ foreach ($ _SERVER as $ name => $ value ) {
18
18
if (0 === strncmp ($ name , 'XDG_ ' , 4 )) return true ;
19
19
}
20
20
return false ;
@@ -29,15 +29,15 @@ private static function xdgCompliant() {
29
29
* @return [:string]
30
30
*/
31
31
public static function variables ($ filter = null ) {
32
- if (null === $ filter ) return $ _ENV ;
32
+ if (null === $ filter ) return $ _SERVER ;
33
33
34
34
$ r = [];
35
35
if (is_array ($ filter )) {
36
36
foreach ($ filter as $ name ) {
37
- isset ($ _ENV [$ name ]) && $ r [$ name ]= $ _ENV [$ name ];
37
+ isset ($ _SERVER [$ name ]) && $ r [$ name ]= $ _SERVER [$ name ];
38
38
}
39
39
} else {
40
- foreach ($ _ENV as $ name => $ value ) {
40
+ foreach ($ _SERVER as $ name => $ value ) {
41
41
preg_match ($ filter , $ name ) && $ r [$ name ]= $ value ;
42
42
}
43
43
}
@@ -82,10 +82,10 @@ public static function export($variables) {
82
82
foreach ($ variables as $ name => $ value ) {
83
83
if (null === $ value ) {
84
84
putenv ($ name );
85
- unset($ _ENV [$ name ]);
85
+ unset($ _SERVER [$ name ]);
86
86
} else {
87
87
putenv ($ name .'= ' .$ value );
88
- $ _ENV [$ name ]= $ value ;
88
+ $ _SERVER [$ name ]= $ value ;
89
89
}
90
90
}
91
91
}
Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ public function __construct($variables) {
21
21
$ this ->original [$ name ]= getenv ($ name );
22
22
if (null === $ value ) {
23
23
putenv ($ name );
24
- unset($ _ENV [$ name ]);
24
+ unset($ _SERVER [$ name ]);
25
25
} else {
26
26
putenv ($ name .'= ' .$ value );
27
- $ _ENV [$ name ]= $ value ;
27
+ $ _SERVER [$ name ]= $ value ;
28
28
}
29
29
}
30
30
}
@@ -34,10 +34,10 @@ public function close() {
34
34
foreach ($ this ->original as $ name => $ value ) {
35
35
if (false === $ value ) {
36
36
putenv ($ name );
37
- unset($ _ENV [$ name ]);
37
+ unset($ _SERVER [$ name ]);
38
38
} else {
39
39
putenv ($ name .'= ' .$ value );
40
- $ _ENV [$ name ]= $ value ;
40
+ $ _SERVER [$ name ]= $ value ;
41
41
}
42
42
}
43
43
}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class EnvironmentTest extends \unittest\TestCase {
9
9
#[BeforeClass]
10
10
public static function clearXDG () {
11
11
$ remove = [];
12
- foreach ($ _ENV as $ variable => $ value ) {
12
+ foreach ($ _SERVER as $ variable => $ value ) {
13
13
if (0 === strncmp ('XDG_ ' , $ variable , 4 )) $ remove [$ variable ]= null ;
14
14
}
15
15
self ::$ set = new EnvironmentSet ($ remove );
You can’t perform that action at this time.
0 commit comments