title: Laravel test not working when running whole test suite, ReflectionException : Class config does not exist
body: <p>I am currently developing a test suite for my lumen API. I am using lumen 5.6 with phpunit 7.</p>
  
  <p>I have the following test:</p>
  
  <pre><code>use PHPUnit\Framework\TestCase;
  
  class ExportControllerTest extends TestCase
  {
  
      public function testGetHeader()
      {
          $controller = app()-&gt;make("App\Http\Controllers\ExportController");
          $header = $controller-&gt;getHeader();
          self::assertNotNull($header);
  
          self::assertEquals($header[0], "title");
      }
  
   }
  </code></pre>
  
  <p>With <code>TestCase.php</code>:</p>
  
  <pre><code>namespace Tests;
  
  abstract class TestCase extends \Laravel\Lumen\Testing\TestCase
  {
      /**
       * Creates the application.
       *
       * @return \Laravel\Lumen\Application
       */
      public function createApplication()
      {
          return require __DIR__.'/../bootstrap/app.php';
      }
  
  }
  </code></pre>
  
  <p>When I run the test individually with the following it works fine:</p>
  
  <blockquote>
    <p>phpunit --bootstrap path_to_project\bootstrap\app.php --configuration
    path_to_project\phpunit.xml
    path_to_project\tests\app\Http\Controllers\ExportControllerTest.php</p>
  </blockquote>
  
  <p>B but when I try to run the whole test suite with: </p>
  
  <blockquote>
    <p>phpunit --bootstrap path_to_project\bootstrap\app.php --configuration
    path_to_project\phpunit.xml path_to_project\tests</p>
  </blockquote>
  
  <p>I get the following error:</p>
  
  <pre><code>ReflectionException : Class config does not exist
   path_to_project\vendor\laravel\framework\src\Illuminate\Container\Container.php:767
   path_to_project\vendor\laravel\framework\src\Illuminate\Container\Container.php:646
   path_to_project\vendor\laravel\framework\src\Illuminate\Container\Container.php:601
   path_to_project\vendor\laravel\lumen-framework\src\Application.php:223
   path_to_project\vendor\laravel\framework\src\Illuminate\Container\Container.php:1210
   path_to_project\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:259
   path_to_project\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:89
   path_to_project\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:65
   path_to_project\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:327
   path_to_project\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:223
   path_to_project\app\Services\RawQueryService.php:114
   path_to_project\app\Services\RawQueryService.php:81
   path_to_project\app\Services\RawQueryService.php:37
   path_to_project\app\Services\SearchService.php:56
   path_to_project\app\Http\Controllers\ExportController.php:83
   path_to_project\tests\app\Http\Controllers\ExportControllerTest.php:19
  </code></pre>
  
  <p>Where the config <code>phpunit.xml</code> is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;phpunit backupGlobals="false"
           backupStaticAttributes="false"
           bootstrap="bootstrap/app.php"
           colors="true"
           convertErrorsToExceptions="true"
           convertNoticesToExceptions="true"
           convertWarningsToExceptions="true"
           processIsolation="false"
           stopOnFailure="false"&gt;
      &lt;testsuites&gt;
          &lt;testsuite name="Application test Suite"&gt;
              &lt;directory suffix="Test.php"&gt;./tests&lt;/directory&gt;
          &lt;/testsuite&gt;
      &lt;/testsuites&gt;
      &lt;filter&gt;
          &lt;whitelist processUncoveredFilesFromWhitelist="true"&gt;
              &lt;directory suffix=".php"&gt;./app&lt;/directory&gt;
          &lt;/whitelist&gt;
      &lt;/filter&gt;
      &lt;php&gt;
          &lt;env name="APP_ENV" value="testing"/&gt;
          &lt;env name="CACHE_DRIVER" value="array"/&gt;
          &lt;env name="QUEUE_DRIVER" value="sync"/&gt;
          &lt;env name="DB_PORT" value="11009"/&gt;
          &lt;env name="DB_DATABASE" value="test"/&gt;
          &lt;env name="DB_HOST" value="localhost"/&gt;
          &lt;env name="DB_USERNAME" value="null"/&gt;
          &lt;env name="DB_PASSWORD" value="null"/&gt;
      &lt;/php&gt;
  &lt;/phpunit&gt;
  </code></pre>
  
  <p>None of the properties in my <code>.env</code> file contain spaces, as I noticed this is often listed as the cause for this error.</p>
  
  <p>Anyone have any idea as to what may cause this issue?</p>
  
  <p>Thank you in advance!</p>