Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078
This commit is contained in:
parent
6419a031d7
commit
4afb23bbd3
762 changed files with 20080 additions and 6368 deletions
core/modules/simpletest
|
@ -534,24 +534,24 @@ function simpletest_classloader_register() {
|
|||
*/
|
||||
function simpletest_generate_file($filename, $width, $lines, $type = 'binary-text') {
|
||||
$text = '';
|
||||
for ($i = 0; $i < $lines; $i++) {
|
||||
// Generate $width - 1 characters to leave space for the "\n" character.
|
||||
for ($j = 0; $j < $width - 1; $j++) {
|
||||
switch ($type) {
|
||||
case 'text':
|
||||
$text .= chr(rand(32, 126));
|
||||
break;
|
||||
case 'binary':
|
||||
$text .= chr(rand(0, 31));
|
||||
break;
|
||||
case 'binary-text':
|
||||
default:
|
||||
$text .= rand(0, 1);
|
||||
break;
|
||||
}
|
||||
for ($i = 0; $i < $lines; $i++) {
|
||||
// Generate $width - 1 characters to leave space for the "\n" character.
|
||||
for ($j = 0; $j < $width - 1; $j++) {
|
||||
switch ($type) {
|
||||
case 'text':
|
||||
$text .= chr(rand(32, 126));
|
||||
break;
|
||||
case 'binary':
|
||||
$text .= chr(rand(0, 31));
|
||||
break;
|
||||
case 'binary-text':
|
||||
default:
|
||||
$text .= rand(0, 1);
|
||||
break;
|
||||
}
|
||||
$text .= "\n";
|
||||
}
|
||||
$text .= "\n";
|
||||
}
|
||||
|
||||
// Create filename.
|
||||
file_put_contents('public://' . $filename . '.txt', $text);
|
||||
|
|
Reference in a new issue