/** * @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; }
/** * @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; }