protected function setUpEnvironment(Application $application)
 {
     $application->configLoader()->loadEnvironmentConfig('test');
     $testDirPath = $application->config()['paths']['root']->expand('test');
     $testDir = new DirectoryIterator($testDirPath);
     $loader = $application->getService('loader');
     foreach ($testDir as $file) {
         if (!$file->isDot() && $file->isDir()) {
             $loader->addPath($file->getRealPath());
         }
     }
 }