Make WordPress Core


Ignore:
Timestamp:
10/09/2016 01:11:14 AM (7 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/hooks/remove_filter.php

    r38571 r38762  
    1111        $callback = '__return_null';
    1212        $hook = new WP_Hook();
    13         $tag = rand_str();
     13        $tag = __FUNCTION__;
    1414        $priority = rand( 1, 100 );
    1515        $accepted_args = rand( 1, 100 );
     
    2525        $callback = array( $a, 'action' );
    2626        $hook = new WP_Hook();
    27         $tag = rand_str();
     27        $tag = __FUNCTION__;
    2828        $priority = rand( 1, 100 );
    2929        $accepted_args = rand( 1, 100 );
     
    3838        $callback = array( 'MockAction', 'action' );
    3939        $hook = new WP_Hook();
    40         $tag = rand_str();
     40        $tag = __FUNCTION__;
    4141        $priority = rand( 1, 100 );
    4242        $accepted_args = rand( 1, 100 );
     
    5252        $callback_two = '__return_false';
    5353        $hook = new WP_Hook();
    54         $tag = rand_str();
     54        $tag = __FUNCTION__;
    5555        $priority = rand( 1, 100 );
    5656        $accepted_args = rand( 1, 100 );
     
    6868        $callback_two = '__return_false';
    6969        $hook = new WP_Hook();
    70         $tag = rand_str();
     70        $tag = __FUNCTION__;
    7171        $priority = rand( 1, 100 );
    7272        $accepted_args = rand( 1, 100 );
Note: See TracChangeset for help on using the changeset viewer.