Esempio n. 1
0
 /**
  * @param $fullSpecPath
  *
  * @return array
  */
 private function createResourcesFromSpecFiles($fullSpecPath)
 {
     $resources = array();
     foreach ($this->filesystem->findPhpFilesIn($fullSpecPath) as $file) {
         $specFile = $file->getRealPath();
         $resources[] = $this->createResourceFromSpecFile($specFile, $fullSpecPath);
     }
     return $resources;
 }
Esempio n. 2
0
 /**
  * @param string $path
  *
  * @return PSR0Resource[]
  */
 protected function findSpecResources($path)
 {
     if (!$this->filesystem->pathExists($path)) {
         return array();
     }
     if ('.php' === substr($path, -4)) {
         return array($this->createResourceFromSpecFile(realpath($path)));
     }
     $resources = array();
     foreach ($this->filesystem->findPhpFilesIn($path) as $file) {
         $resources[] = $this->createResourceFromSpecFile($file->getRealPath());
     }
     return $resources;
 }