Make WordPress Core


Ignore:
Timestamp:
10/09/2016 01:11:14 AM (8 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/functions.php

    r38761 r38762  
    307307        $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg',
    308308                              0, 0, 100, 100, 100, 100, false,
    309                               DIR_TESTDATA . '/images/' . rand_str() . '.jpg' );
     309                              DIR_TESTDATA . '/images/' . __FUNCTION__ . '.jpg' );
    310310        $this->assertNotInstanceOf( 'WP_Error', $file );
    311311        $this->assertFileExists( $file );
Note: See TracChangeset for help on using the changeset viewer.