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()
5252 $ this ->assertSame ('a value with a # character ' , getenv ('CQUOTES ' ));
5353 $ this ->assertSame ('a value with a # character & a quote " character inside quotes ' , getenv ('CQUOTESWITHQUOTE ' ));
5454 $ this ->assertEmpty (getenv ('CNULL ' ));
55+ $ this ->assertEmpty (getenv ('EMPTY ' ));
5556 }
5657
5758 public function testQuotedDotenvLoadsEnvironmentVars ()
@@ -261,23 +262,27 @@ public function testDotenvAssertions()
261262 $ this ->assertEmpty (getenv ('ASSERTVAR2 ' ));
262263 $ this ->assertEmpty (getenv ('ASSERTVAR3 ' ));
263264 $ this ->assertSame ('0 ' , getenv ('ASSERTVAR4 ' ));
265+ $ this ->assertSame ('#foo ' , getenv ('ASSERTVAR5 ' ));
264266
265267 $ dotenv ->required (array (
266268 'ASSERTVAR1 ' ,
267269 'ASSERTVAR2 ' ,
268270 'ASSERTVAR3 ' ,
269271 'ASSERTVAR4 ' ,
272+ 'ASSERTVAR5 ' ,
270273 ));
271274
272275 $ dotenv ->required (array (
273276 'ASSERTVAR1 ' ,
274277 'ASSERTVAR4 ' ,
278+ 'ASSERTVAR5 ' ,
275279 ))->notEmpty ();
276280
277281 $ dotenv ->required (array (
278282 'ASSERTVAR1 ' ,
279283 'ASSERTVAR4 ' ,
280- ))->notEmpty ()->allowedValues (array ('0 ' , 'val1 ' ));
284+ 'ASSERTVAR5 ' ,
285+ ))->notEmpty ()->allowedValues (array ('0 ' , 'val1 ' , '#foo ' ));
281286
282287 $ this ->assertTrue (true ); // anything wrong an an exception will be thrown
283288 }
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ ASSERTVAR1="val1"
22ASSERTVAR2 = " "
33ASSERTVAR3 = " "
44ASSERTVAR4 = " 0" # empty looking value
5+ ASSERTVAR5 = #foo
You can’t perform that action at this time.
0 commit comments