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->findSpecFilesIn($path) as $file) {
$resources[] = $this->createResourceFromSpecFile($file->getRealPath());
}
return $resources;
}