File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public function testCommentedDotenvLoadsEnvironmentVars()
52
52
$ this ->assertSame ('a value with a # character ' , getenv ('CQUOTES ' ));
53
53
$ this ->assertSame ('a value with a # character & a quote " character inside quotes ' , getenv ('CQUOTESWITHQUOTE ' ));
54
54
$ this ->assertEmpty (getenv ('CNULL ' ));
55
+ $ this ->assertEmpty (getenv ('EMPTY ' ));
55
56
}
56
57
57
58
public function testQuotedDotenvLoadsEnvironmentVars ()
@@ -261,23 +262,27 @@ public function testDotenvAssertions()
261
262
$ this ->assertEmpty (getenv ('ASSERTVAR2 ' ));
262
263
$ this ->assertEmpty (getenv ('ASSERTVAR3 ' ));
263
264
$ this ->assertSame ('0 ' , getenv ('ASSERTVAR4 ' ));
265
+ $ this ->assertSame ('#foo ' , getenv ('ASSERTVAR5 ' ));
264
266
265
267
$ dotenv ->required (array (
266
268
'ASSERTVAR1 ' ,
267
269
'ASSERTVAR2 ' ,
268
270
'ASSERTVAR3 ' ,
269
271
'ASSERTVAR4 ' ,
272
+ 'ASSERTVAR5 ' ,
270
273
));
271
274
272
275
$ dotenv ->required (array (
273
276
'ASSERTVAR1 ' ,
274
277
'ASSERTVAR4 ' ,
278
+ 'ASSERTVAR5 ' ,
275
279
))->notEmpty ();
276
280
277
281
$ dotenv ->required (array (
278
282
'ASSERTVAR1 ' ,
279
283
'ASSERTVAR4 ' ,
280
- ))->notEmpty ()->allowedValues (array ('0 ' , 'val1 ' ));
284
+ 'ASSERTVAR5 ' ,
285
+ ))->notEmpty ()->allowedValues (array ('0 ' , 'val1 ' , '#foo ' ));
281
286
282
287
$ this ->assertTrue (true ); // anything wrong an an exception will be thrown
283
288
}
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ ASSERTVAR1="val1"
2
2
ASSERTVAR2 = " "
3
3
ASSERTVAR3 = " "
4
4
ASSERTVAR4 = "0" # empty looking value
5
+ ASSERTVAR5 = #foo
You can’t perform that action at this time.
0 commit comments