public function assertFinderFinds(FileFinder $finder, $expect, $message = null)
 {
     $found = $finder->find($this->base);
     foreach ($expect as $k => $file) {
         $expect[$k] = "{$this->base}/{$file}";
     }
     sort($expect);
     sort($found);
     $this->assertEquals($expect, $found, $message);
 }
 public function acceptDir($basename, $pathname, $depth)
 {
     // Skip over the assets directory in the site root.
     if ($depth == 1 && $basename == ASSETS_DIR) {
         return false;
     }
     // Skip over any lang directories in the top level of the module.
     if ($depth == 2 && $basename == self::LANG_DIR) {
         return false;
     }
     // Skip over the vendor directories
     if (($depth == 1 || $depth == 2) && $basename == 'vendor') {
         return false;
     }
     // If we're not in testing mode, then skip over any tests directories.
     if ($this->getOption('ignore_tests') && $basename == self::TESTS_DIR) {
         return false;
     }
     // Ignore any directories which contain a _manifest_exclude file.
     if (file_exists($pathname . '/' . self::EXCLUDE_FILE)) {
         return false;
     }
     // Only include top level module directories which have a configuration
     // _config.php file. However, if we're in themes mode then include
     // the themes dir without a config file.
     $lackingConfig = $depth == 1 && !($this->getOption('include_themes') && $basename == THEMES_DIR) && !file_exists($pathname . '/' . self::CONFIG_FILE) && !file_exists($pathname . '/' . self::CONFIG_DIR) && $basename !== self::CONFIG_DIR && !file_exists("{$pathname}/../" . self::CONFIG_DIR);
     if ($lackingConfig) {
         return false;
     }
     return parent::acceptDir($basename, $pathname, $depth);
 }