Make WordPress Core


Ignore:
Timestamp:
12/19/2021 01:42:37 PM (3 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Reduce the use of unnecessary randomness in tests.

This increases the overall reliability of the tests.

Props johnillo

Fixes #37371

File:
1 edited

Legend:

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

    r52010 r52389  
    134134
    135135        $terms = array(
    136             rand_str(),
    137             rand_str(),
    138             rand_str(),
     136            'term0',
     137            'term1',
     138            'term2',
    139139        );
    140140
     
    165165    public function test_set_object_terms_invalid() {
    166166        // Bogus taxonomy.
    167         $result = wp_set_object_terms( self::$post_ids[0], array( rand_str() ), rand_str() );
     167        $result = wp_set_object_terms( self::$post_ids[0], array( 'foo' ), 'invalid-taxonomy' );
    168168        $this->assertWPError( $result );
    169169    }
Note: See TracChangeset for help on using the changeset viewer.