Commit 120111a9 authored by xjm's avatar xjm

Issue #2588529 by David_Rothstein, cilefen, kikoalonsob: Code indentation is...

Issue #2588529 by David_Rothstein, cilefen, kikoalonsob: Code indentation is incorrect in simpletest_generate_file()
parent 1ba3fd48
...@@ -534,24 +534,24 @@ function simpletest_classloader_register() { ...@@ -534,24 +534,24 @@ function simpletest_classloader_register() {
*/ */
function simpletest_generate_file($filename, $width, $lines, $type = 'binary-text') { function simpletest_generate_file($filename, $width, $lines, $type = 'binary-text') {
$text = ''; $text = '';
for ($i = 0; $i < $lines; $i++) { for ($i = 0; $i < $lines; $i++) {
// Generate $width - 1 characters to leave space for the "\n" character. // Generate $width - 1 characters to leave space for the "\n" character.
for ($j = 0; $j < $width - 1; $j++) { for ($j = 0; $j < $width - 1; $j++) {
switch ($type) { switch ($type) {
case 'text': case 'text':
$text .= chr(rand(32, 126)); $text .= chr(rand(32, 126));
break; break;
case 'binary': case 'binary':
$text .= chr(rand(0, 31)); $text .= chr(rand(0, 31));
break; break;
case 'binary-text': case 'binary-text':
default: default:
$text .= rand(0, 1); $text .= rand(0, 1);
break; break;
}
} }
$text .= "\n";
} }
$text .= "\n";
}
// Create filename. // Create filename.
file_put_contents('public://' . $filename . '.txt', $text); file_put_contents('public://' . $filename . '.txt', $text);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment