Esempio n. 1
0
 protected function discoverBehatYml()
 {
     $scanDirs = [Platform::sharedDir(), Platform::webDir(), Platform::rootDir() . '/tests'];
     if (is_dir(Platform::repoDir())) {
         $scanDirs[] = Platform::repoDir();
     }
     $finder = new Finder();
     $finder->files()->in($scanDirs)->name('behat.yml');
     return $finder;
 }
 public function testRepoDir()
 {
     mkdir(Platform::repoDir());
     $this->assertTrue(is_dir(self::$tmpName . '/repository'));
 }
 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;
 }