reverted: --- b/core/modules/simpletest/src/WebTestBase.php +++ a/core/modules/simpletest/src/WebTestBase.php @@ -448,45 +448,16 @@ } /** + * Gets a list files that can be used in tests. - * Gets a list of files that can be used in tests. - * - * The first time this method is called, the class will generate a bunch of - * test files in text and in binary format. These files are stored in - * public:// and can be used for tests. It will copy all files in - * core/modules/simpletest/files to public:// as well. These contain image, - * SQL, PHP, JavaScript and HTML files. - * - * All files are prefixed with their type: - * - text-*.txt and text-* (no extension) - * - binary-* (no extension) - * - html-*.html - * - image-*.png, image-*.jpg and image-*.gif - * - javascript-*.txt and javascript-*.script - * - php-*.txt and php-*.php - * - sql-*.txt and sql-*.sql - * - * Any subsequent calls will not generate any new files, or copy the files - * over again. However, if a test class adds a new file to public:// that - * is prefixed with one of the above types, it will get returned as well, even - * on subsequent calls. * * @param $type * File type, possible values: 'binary', 'html', 'image', 'javascript', * 'php', 'sql', 'text'. * @param $size + * File size in bytes to match. Please check the tests/files folder. - * (optional) File size in bytes to match. Defaults to NULL, which will not - * filter the returned list by size. The files generated by this function - * are of the following sizes (in bytes): - * - binary: 16, 256, 1024, 2048, and 20480 - * - html: 24 - * - sql: 41 - * - php: 44, and 47 - * - javascript: 57, and 58 - * - text: 64, and 1024 - * - image: 125, 183, 964, 1831, 1901, and 39325 * * @return + * List of files that match filter. - * List of files in public:// that match the filter(s). */ protected function drupalGetTestFiles($type, $size = NULL) { if (empty($this->generatedTestFiles)) { only in patch2: unchanged: --- core/modules/simpletest/simpletest.module (revision 74c8c59941c904f2e3de37e6550e66c4051dc3c0) +++ core/modules/simpletest/simpletest.module (revision ) @@ -489,6 +489,11 @@ /** * Generates test file. * + * The file is prefixed by its type: + * - text-*.txt and text-* (no extension) + * - binary-* (no extension) + * + * * @param string $filename * The name of the file, including the path. * @param int $width only in patch2: unchanged: --- core/modules/simpletest/src/WebTestBase.php (revision 74c8c59941c904f2e3de37e6550e66c4051dc3c0) +++ core/modules/simpletest/src/WebTestBase.php (revision ) @@ -446,16 +446,42 @@ } /** - * Gets a list files that can be used in tests. + * Returns files generated by the function simplest_generate_files() + * which is in simpletest.module. These files can then be used in tests. * + * The first time this method is called, the class will generate numerous + * test files in text and binary format. These files are stored in + * public:// and can be used for tests. It will copy all files in + * core/modules/simpletest/files to public:// as well. These contain image, + * SQL, PHP, JavaScript and HTML files, and they will be prefixed by their type + * - html-*.html + * - image-*.png, image-*.jpg and image-*.gif + * - javascript-*.txt and javascript-*.script + * - php-*.txt and php-*.php + * - sql-*.txt and sql-*.sql + * + * Subsequent calls will not generate new files or copy the files from + * core/modules/simpletest/files again. However, if a test class adds a new + * file to public:// that is prefixed with one of the above types, + * it will get returned as well, even on subsequent calls. + * + * * @param $type * File type, possible values: 'binary', 'html', 'image', 'javascript', * 'php', 'sql', 'text'. * @param $size - * File size in bytes to match. Please check the tests/files folder. - * - * @return - * List of files that match filter. + * (optional) File size in bytes to match. Defaults to NULL, which will not + * filter the returned list by size. The files generated by this function + * are of the following sizes (in bytes): + * - binary: 16, 256, 1024, 2048, and 20480 + * - html: 24 + * - sql: 41 + * - php: 44, and 47 + * - javascript: 57, and 58 + * - text: 64, and 1024 + * - image: 125, 183, 964, 1831, 1901, and 39325 + * @return array + * List of files in public:// that match the filter(s). */ protected function drupalGetTestFiles($type, $size = NULL) { if (empty($this->generatedTestFiles)) {