@@ -25,6 +25,8 @@ class DebugCommandTest extends TestCase
2525     */ 
2626    public  function  testErrorOnUninitializedDotenv ()
2727    {
28+         unset($ _SERVER  ['SYMFONY_DOTENV_VARS ' ]);
29+ 
2830        $ command  = new  DebugCommand ('dev ' , __DIR__ .'/Fixtures/Scenario1 ' );
2931        $ command ->setHelperSet (new  HelperSet ([new  FormatterHelper ()]));
3032        $ tester  = new  CommandTester ($ command );
@@ -34,6 +36,30 @@ public function testErrorOnUninitializedDotenv()
3436        $ this  ->assertStringContainsString ('[ERROR] Dotenv component is not initialized ' , $ output );
3537    }
3638
39+     /** 
40+      * @runInSeparateProcess 
41+      */ 
42+     public  function  testEmptyDotEnvVarsList ()
43+     {
44+         $ _SERVER  ['SYMFONY_DOTENV_VARS ' ] = '' ;
45+ 
46+         $ command  = new  DebugCommand ('dev ' , __DIR__ .'/Fixtures/Scenario1 ' );
47+         $ command ->setHelperSet (new  HelperSet ([new  FormatterHelper ()]));
48+         $ tester  = new  CommandTester ($ command );
49+         $ tester ->execute ([]);
50+         $ expectedFormat  = <<<'OUTPUT'
51+ %a 
52+  ---------- ------- ------------ ------%S 
53+   Variable   Value   .env.local   .env%S 
54+  ---------- ------- ------------ ------%S 
55+ 
56+  // Note real values might be different between web and CLI.%S 
57+ %a 
58+ OUTPUT;
59+ 
60+         $ this  ->assertStringMatchesFormat ($ expectedFormat , $ tester ->getDisplay ());
61+     }
62+ 
3763    public  function  testScenario1InDevEnv ()
3864    {
3965        $ output  = $ this  ->executeCommand (__DIR__ .'/Fixtures/Scenario1 ' , 'dev ' );
0 commit comments