Make WordPress Core


Ignore:
Timestamp:
08/26/2016 08:21:30 PM (8 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/xmlrpc/wp/newPost.php

    r36163 r38382  
    234234        $this->make_user_by_role( 'editor' );
    235235
    236         $tag1 = wp_create_tag ( rand_str( 30 ) );
     236        $tag1 = wp_create_tag( 'tag1' );
    237237        $this->assertInternalType( 'array', $tag1 );
    238         $tag2 = wp_create_tag ( rand_str( 30 ) );
     238        $tag2 = wp_create_tag( 'tag2' );
    239239        $this->assertInternalType( 'array', $tag2 );
    240         $tag3 = wp_create_tag ( rand_str( 30 ) );
     240        $tag3 = wp_create_tag( 'tag3' );
    241241        $this->assertInternalType( 'array', $tag3 );
    242242
     
    259259        $this->make_user_by_role( 'editor' );
    260260
    261         $ambiguous_name = rand_str( 30 );
     261        $ambiguous_name = 'foo';
    262262        $parent_cat = wp_create_category( $ambiguous_name );
    263263        $child_cat = wp_create_category( $ambiguous_name, $parent_cat );
    264264
    265         $cat1_name = rand_str( 30 );
     265        $cat1_name = 'cat1';
    266266        $cat1 = wp_create_category( $cat1_name, $parent_cat );
    267         $cat2_name = rand_str( 30 );
     267        $cat2_name = 'cat2';
    268268
    269269        // first a post with valid categories; one that already exists and one to be created
Note: See TracChangeset for help on using the changeset viewer.