Make WordPress Core


Ignore:
Timestamp:
08/26/2016 08:21:30 PM (10 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Remove many unnecessary calls to rand_str() which can, in theory, fail at random. Static strings are much more appropriate.

See #37371

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/wpSetObjectTerms.php

    r37649 r38382  
    111111        $terms = array();
    112112        for ($i=0; $i<3; $i++ ) {
    113             $term = rand_str();
     113            $term = "term_{$i}";
    114114            $result = wp_insert_term( $term, $this->taxonomy );
    115115            $this->assertInternalType( 'array', $result );
     
    246246        $terms_1 = array();
    247247        for ($i=0; $i<3; $i++ ) {
    248             $term = rand_str();
     248            $term = "term_{$i}";
    249249            $result = wp_insert_term( $term, $this->taxonomy );
    250250            $this->assertInternalType( 'array', $result );
     
    256256        $terms_2[0] = $terms_1[1];
    257257
    258         $term = rand_str();
     258        $term = 'term';
    259259        $result = wp_insert_term( $term, $this->taxonomy );
    260260        $terms_2[1] = $result['term_id'];
Note: See TracChangeset for help on using the changeset viewer.