@@ -14,20 +14,20 @@ public function testLoadPutenv()
14
14
15
15
$ loader ->load (__DIR__ . '/stubs/test.env ' , false , 0 );
16
16
17
- $ this ->assertEquals ('1 ' , getenv ('a ' ), 'Unquoted number ' );
18
- $ this ->assertEquals ('2 ' , getenv ('b ' ), 'Quoted number ' );
19
- $ this ->assertEquals ('$3# ' , getenv ('c ' ), 'Unquoted string ' );
20
- $ this ->assertEquals ('lol ' , getenv ('d ' ), 'Quoted string ' );
21
- $ this ->assertEquals ('' , getenv ('e ' ), 'Empty string ' );
22
- $ this ->assertEquals ('"6" ' , getenv ('f ' ), 'Escaped numeric string ' );
23
- $ this ->assertEquals ('one_two ' , getenv ('1_2 ' ), 'Underscored string ' );
24
- $ this ->assertEquals ('Apple Ball ' , getenv ('A_B ' ), 'Multi word string ' );
17
+ $ this ->assertEquals ('1 ' , getenv ('a ' ), 'Unquoted number ' );
18
+ $ this ->assertEquals ('2 ' , getenv ('b ' ), 'Quoted number ' );
19
+ $ this ->assertEquals ('$3# ' , getenv ('c ' ), 'Unquoted string ' );
20
+ $ this ->assertEquals ('lol ' , getenv ('d ' ), 'Quoted string ' );
21
+ $ this ->assertEquals ('' , getenv ('e ' ), 'Empty string ' );
22
+ $ this ->assertEquals ('"6" ' , getenv ('f ' ), 'Escaped numeric string ' );
23
+ $ this ->assertEquals ('one_two ' , getenv ('1_2 ' ), 'Underscored string ' );
24
+ $ this ->assertEquals ('Apple Ball ' , getenv ('A_B ' ), 'Multi word string ' );
25
25
$ this ->assertEquals ("line 1 \nline 2 " , getenv ('MUL ' ), 'Multi line string ' );
26
26
27
27
$ this ->assertFalse (getenv ('MuL ' ), 'Key should be case sensitive ' );
28
28
29
29
$ this ->assertArrayNotHasKey ('a ' , $ _SERVER , 'By default should not set to $_SERVER ' );
30
- $ this ->assertArrayNotHasKey ('b ' , $ _ENV , 'By default should not set to $_ENV ' );
30
+ $ this ->assertArrayNotHasKey ('b ' , $ _ENV , 'By default should not set to $_ENV ' );
31
31
}
32
32
33
33
public function testLoadGlobals ()
@@ -39,14 +39,14 @@ public function testLoadGlobals()
39
39
foreach (['SERVER ' , 'ENV ' ] as $ name ) {
40
40
$ source = $ name === 'ENV ' ? $ _ENV : $ _SERVER ;
41
41
42
- $ this ->assertEquals ('1 ' , $ source ['a ' ], 'Unquoted number ' );
43
- $ this ->assertEquals ('2 ' , $ source ['b ' ], 'Quoted number ' );
44
- $ this ->assertEquals ('$3# ' , $ source ['c ' ], 'Unquoted string ' );
45
- $ this ->assertEquals ('lol ' , $ source ['d ' ], 'Quoted string ' );
46
- $ this ->assertEquals ('' , $ source ['e ' ], 'Empty string ' );
47
- $ this ->assertEquals ('"6" ' , $ source ['f ' ], 'Escaped numeric string ' );
48
- $ this ->assertEquals ('one_two ' , $ source ['1_2 ' ], 'Underscored string ' );
49
- $ this ->assertEquals ('Apple Ball ' , $ source ['A_B ' ], 'Multi word string ' );
42
+ $ this ->assertEquals ('1 ' , $ source ['a ' ], 'Unquoted number ' );
43
+ $ this ->assertEquals ('2 ' , $ source ['b ' ], 'Quoted number ' );
44
+ $ this ->assertEquals ('$3# ' , $ source ['c ' ], 'Unquoted string ' );
45
+ $ this ->assertEquals ('lol ' , $ source ['d ' ], 'Quoted string ' );
46
+ $ this ->assertEquals ('' , $ source ['e ' ], 'Empty string ' );
47
+ $ this ->assertEquals ('"6" ' , $ source ['f ' ], 'Escaped numeric string ' );
48
+ $ this ->assertEquals ('one_two ' , $ source ['1_2 ' ], 'Underscored string ' );
49
+ $ this ->assertEquals ('Apple Ball ' , $ source ['A_B ' ], 'Multi word string ' );
50
50
$ this ->assertEquals ("line 1 \nline 2 " , $ source ['MUL ' ], 'Multi line string ' );
51
51
52
52
$ this ->assertArrayNotHasKey ('mUl ' , $ source , 'Key should be case sensitive ' );
@@ -59,35 +59,35 @@ public function testLoadOverrideAll()
59
59
60
60
$ loader ->load (__DIR__ . '/stubs/override.env ' , true , Loader::ALL );
61
61
62
- $ this ->assertNotEquals ('1 ' , getenv ('a ' ), 'Unquoted number old ' );
63
- $ this ->assertNotEquals ('2 ' , getenv ('b ' ), 'Quoted number old ' );
64
- $ this ->assertNotEquals ('$3# ' , getenv ('c ' ), 'Unquoted string old ' );
65
- $ this ->assertNotEquals ('lol ' , getenv ('d ' ), 'Quoted string old ' );
66
- $ this ->assertNotEquals ('"6" ' , getenv ('f ' ), 'Escaped numeric string old ' );
62
+ $ this ->assertNotEquals ('1 ' , getenv ('a ' ), 'Unquoted number old ' );
63
+ $ this ->assertNotEquals ('2 ' , getenv ('b ' ), 'Quoted number old ' );
64
+ $ this ->assertNotEquals ('$3# ' , getenv ('c ' ), 'Unquoted string old ' );
65
+ $ this ->assertNotEquals ('lol ' , getenv ('d ' ), 'Quoted string old ' );
66
+ $ this ->assertNotEquals ('"6" ' , getenv ('f ' ), 'Escaped numeric string old ' );
67
67
$ this ->assertNotEquals ("line 1 \nline 2 " , getenv ('MUL ' ), 'Multi line string old ' );
68
68
69
- $ this ->assertEquals ('o1 ' , getenv ('a ' ), 'Unquoted number new ' );
70
- $ this ->assertEquals ('o2 ' , getenv ('b ' ), 'Quoted number new ' );
71
- $ this ->assertEquals ('o$3# ' , getenv ('c ' ), 'Unquoted string new ' );
72
- $ this ->assertEquals ('olol ' , getenv ('d ' ), 'Quoted string new ' );
73
- $ this ->assertEquals ('"o6" ' , getenv ('f ' ), 'Escaped numeric string new ' );
69
+ $ this ->assertEquals ('o1 ' , getenv ('a ' ), 'Unquoted number new ' );
70
+ $ this ->assertEquals ('o2 ' , getenv ('b ' ), 'Quoted number new ' );
71
+ $ this ->assertEquals ('o$3# ' , getenv ('c ' ), 'Unquoted string new ' );
72
+ $ this ->assertEquals ('olol ' , getenv ('d ' ), 'Quoted string new ' );
73
+ $ this ->assertEquals ('"o6" ' , getenv ('f ' ), 'Escaped numeric string new ' );
74
74
$ this ->assertEquals ("oline 1 \nline 2 " , getenv ('MUL ' ), 'Multi line string new ' );
75
75
76
76
foreach (['SERVER ' , 'ENV ' ] as $ name ) {
77
77
$ source = $ name === 'ENV ' ? $ _ENV : $ _SERVER ;
78
78
79
- $ this ->assertNotEquals ('1 ' , $ source ['a ' ], 'Unquoted number old ' );
80
- $ this ->assertNotEquals ('2 ' , $ source ['b ' ], 'Quoted number old ' );
81
- $ this ->assertNotEquals ('$3# ' , $ source ['c ' ], 'Unquoted string old ' );
82
- $ this ->assertNotEquals ('lol ' , $ source ['d ' ], 'Quoted string old ' );
83
- $ this ->assertNotEquals ('"6" ' , $ source ['f ' ], 'Escaped numeric string old ' );
79
+ $ this ->assertNotEquals ('1 ' , $ source ['a ' ], 'Unquoted number old ' );
80
+ $ this ->assertNotEquals ('2 ' , $ source ['b ' ], 'Quoted number old ' );
81
+ $ this ->assertNotEquals ('$3# ' , $ source ['c ' ], 'Unquoted string old ' );
82
+ $ this ->assertNotEquals ('lol ' , $ source ['d ' ], 'Quoted string old ' );
83
+ $ this ->assertNotEquals ('"6" ' , $ source ['f ' ], 'Escaped numeric string old ' );
84
84
$ this ->assertNotEquals ("line 1 \nline 2 " , $ source ['MUL ' ], 'Multi line string old ' );
85
85
86
- $ this ->assertEquals ('o1 ' , $ source ['a ' ], 'Unquoted number new ' );
87
- $ this ->assertEquals ('o2 ' , $ source ['b ' ], 'Quoted number new ' );
88
- $ this ->assertEquals ('o$3# ' , $ source ['c ' ], 'Unquoted string new ' );
89
- $ this ->assertEquals ('olol ' , $ source ['d ' ], 'Quoted string new ' );
90
- $ this ->assertEquals ('"o6" ' , $ source ['f ' ], 'Escaped numeric string new ' );
86
+ $ this ->assertEquals ('o1 ' , $ source ['a ' ], 'Unquoted number new ' );
87
+ $ this ->assertEquals ('o2 ' , $ source ['b ' ], 'Quoted number new ' );
88
+ $ this ->assertEquals ('o$3# ' , $ source ['c ' ], 'Unquoted string new ' );
89
+ $ this ->assertEquals ('olol ' , $ source ['d ' ], 'Quoted string new ' );
90
+ $ this ->assertEquals ('"o6" ' , $ source ['f ' ], 'Escaped numeric string new ' );
91
91
$ this ->assertEquals ("oline 1 \nline 2 " , $ source ['MUL ' ], 'Multi line string new ' );
92
92
}
93
93
}
0 commit comments