diff --git a/core/tests/bootstrap.php b/core/tests/bootstrap.php index 4c33b2d..e5faa4a 100644 --- a/core/tests/bootstrap.php +++ b/core/tests/bootstrap.php @@ -7,6 +7,14 @@ * @see phpunit.xml.dist */ +/** + * Finds all valid module directories recursively within a given directory. + * + * @param string $scan_directory + * The directory that should be recursively scanned. + * @return array + * An array of module directories found within the scanned directory. + */ function drupal_phpunit_find_module_directories($scan_directory) { $module_directories = array(); $dir = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($scan_directory, RecursiveDirectoryIterator::FOLLOW_SYMLINKS)); @@ -19,6 +27,14 @@ function drupal_phpunit_find_module_directories($scan_directory) { return $module_directories; } +/** + * Finds site-specific module directories given the path to the sites folder. + * + * @param string $sites_path + * The path to the sites folder. + * @return array + * An array of site-specific module directories. + */ function drupal_phpunit_find_site_module_directories($sites_path) { $module_paths = array_map(function($dir) use ($sites_path) { $module_dir = "$sites_path/$dir/modules"; @@ -32,12 +48,12 @@ function drupal_phpunit_find_site_module_directories($sites_path) { /** * Registers the namespace for each module directory with the autoloader. * - * @param ComposerAutoloader $loader + * @param Composer\Autoload\ClassLoader $loader * The supplied autoloader. * @param array $dirs * An array of module directories. */ -function drupal_phpunit_register_module_dirs($loader, $dirs) { +function drupal_phpunit_register_module_dirs(Composer\Autoload\ClassLoader $loader, $dirs) { foreach ($dirs as $dir) { $lib_path = $dir . '/lib'; if (is_dir($lib_path)) {