Build/Test Tools: Begin eliminating unnecessary randomness in tests.

Although unlikely, clashes in randomly generated strings could cause unexpected failures. In addition, most randomness is entirely unnecessary, is bad practice, and increases test time (however small it may be).

See #37371


git-svn-id: https://develop.svn.wordpress.org/trunk@38762 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2016-10-09 01:11:14 +00:00
parent b45f2feada
commit c91be6f1fe
21 changed files with 105 additions and 106 deletions

View File

@@ -270,8 +270,8 @@ class Tests_Multisite_Site extends WP_UnitTestCase {
* should change with upload directories.
*/
function test_upload_directories_after_multiple_wpmu_delete_blog() {
$filename = rand_str().'.jpg';
$contents = rand_str();
$filename = __FUNCTION__ . '.jpg';
$contents = __FUNCTION__ . '_contents';
// Upload a file to the main site on the network.
$file1 = wp_upload_bits( $filename, null, $contents );