protected static function expandWildcardsFor($include)
    {
        if (1 !== preg_match('/[\?\.\*]/', $include)) {
            return [$include,];
        }

        try {
            $configFiles = Finder::create()->files()
                ->name('/codeception(\.dist\.yml|\.yml)/')
                ->in(self::$dir . DIRECTORY_SEPARATOR . $include);
        } catch (\InvalidArgumentException $e) {
            throw new ConfigurationException(
                "Configuration file(s) could not be found in \"$include\"."
            );
        }

        $paths = [];
        foreach ($configFiles as $file) {
            $paths[] = codecept_relative_path($file->getPath());
        }

        return $paths;
    }
protected static function expandWildcardsFor($include)
    {
        if (1 !== preg_match('/[\?\.\*]/', $include)) {
            return [$include,];
        }

        try {
            $configFiles = Finder::create()->files()
                ->name('/codeception(\.dist\.yml|\.yml)/')
                ->in(self::$dir . DIRECTORY_SEPARATOR . $include);
        } catch (\InvalidArgumentException $e) {
            throw new ConfigurationException(
                "Configuration file(s) could not be found in \"$include\"."
            );
        }

        $paths = [];
        foreach ($configFiles as $file) {
            $paths[] = codecept_relative_path($file->getPath());
        }

        return $paths;
    }
protected static function expandWildcardsFor ( $ include ) { if ( 1 !== preg_match ( '/[\?\.\*]/' , $ include ) ) { return [ $ include , ] ; } try { $ configFiles = Finder :: create ( ) -> files ( ) -> name ( '/codeception(\.dist\.yml|\.yml)/' ) -> in ( self :: $ dir . DIRECTORY_SEPARATOR . $ include ) ; } catch ( \ InvalidArgumentException $ e ) { throw new ConfigurationException ( "Configuration file(s) could not be found in \"$include\"." ) ; } $ paths = [ ] ; foreach ( $ configFiles as $ file ) { $ paths [ ] = codecept_relative_path ( $ file -> getPath ( ) ) ; } return $ paths ; }
Finds config files in given wildcarded include path.
Returns the expanded paths or the original if not a wildcard.

@param $include
@return array
@throws ConfigurationException
Finds config files in given wildcarded include path . Returns the expanded paths or the original if not a wildcard .