Esempio n. 1
0
 protected function discoverBehatYml()
 {
     $depth = $this->stdIn->getOption('depth');
     $scanDirs = [Platform::sharedDir(), Platform::webDir()];
     if (is_dir(Platform::repoDir())) {
         $scanDirs[] = Platform::repoDir();
     }
     if (is_dir(Platform::testsDir())) {
         $scanDirs[] = Platform::testsDir();
     }
     $extraDir = $this->stdIn->getOption('folder');
     if ($extraDir && is_dir($extraDir)) {
         $scanDirs[] = $extraDir;
     }
     $finder = new Finder();
     $finder->files()->in($scanDirs)->depth("< {$depth}")->name('behat.yml');
     return $finder;
 }