src/Behat/Behat/Gherkin/Specification/Locator/FilesystemFeatureLocator.php
private function findFeatureFiles($path)
    {
        $absolutePath = $this->findAbsolutePath($path);

        if (!$absolutePath) {
            return array($path);
        }

        if (is_file($absolutePath)) {
            return array($absolutePath);
        }

        $iterator = new RegexIterator(
            new RecursiveIteratorIterator(
                new RecursiveDirectoryIterator(
                    $absolutePath,
                    RecursiveDirectoryIterator::FOLLOW_SYMLINKS | RecursiveDirectoryIterator::SKIP_DOTS
                )
            ),
            '/^.+\.feature$/i',
            RegexIterator::MATCH
        );

        $paths = array_map('strval', iterator_to_array($iterator));
        uasort($paths, 'strnatcasecmp');

        return $paths;
    }
private function findFeatureFiles($path)
    {
        $absolutePath = $this->findAbsolutePath($path);

        if (!$absolutePath) {
            return array($path);
        }

        if (is_file($absolutePath)) {
            return array($absolutePath);
        }

        $iterator = new RegexIterator(
            new RecursiveIteratorIterator(
                new RecursiveDirectoryIterator(
                    $absolutePath,
                    RecursiveDirectoryIterator::FOLLOW_SYMLINKS | RecursiveDirectoryIterator::SKIP_DOTS
                )
            ),
            '/^.+\.feature$/i',
            RegexIterator::MATCH
        );

        $paths = array_map('strval', iterator_to_array($iterator));
        uasort($paths, 'strnatcasecmp');

        return $paths;
    }
private function findFeatureFiles ( $ path ) { $ absolutePath = $ this -> findAbsolutePath ( $ path ) ; if ( ! $ absolutePath ) { return array ( $ path ) ; } if ( is_file ( $ absolutePath ) ) { return array ( $ absolutePath ) ; } $ iterator = new RegexIterator ( new RecursiveIteratorIterator ( new RecursiveDirectoryIterator ( $ absolutePath , RecursiveDirectoryIterator :: FOLLOW_SYMLINKS | RecursiveDirectoryIterator :: SKIP_DOTS ) ) , '/^.+\.feature$/i' , RegexIterator :: MATCH ) ; $ paths = array_map ( 'strval' , iterator_to_array ( $ iterator ) ) ; uasort ( $ paths , 'strnatcasecmp' ) ; return $ paths ; }
Loads feature files paths from provided path.

@param string $path

@return string[]
Loads feature files paths from provided path .