PhpSpec\Locator\PSR0\PSR0Locator::findSpecResources PHP Method

findSpecResources() protected method

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