/**
  * Load the Codeception tests from disk.
  */
 public function loadTests()
 {
     if (!isset($this->config['tests'])) {
         return;
     }
     foreach ($this->config['tests'] as $type => $active) {
         // If the test type has been disabled in the Webception config,
         //      skip processing the directory read for those tests.
         if (!$active) {
             break;
         }
         $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator("{$this->config['paths']['tests']}/{$type}/", \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST);
         // Iterate through all the files, and filter out
         //      any files that are in the ignore list.
         foreach ($files as $file) {
             if (!in_array($file->getFilename(), $this->config['ignore']) && $file->isFile()) {
                 // Declare a new test and add it to the list.
                 $test = new Test();
                 $test->init($type, $file);
                 $this->addTest($test);
                 unset($test);
             }
         }
     }
 }