Make WordPress Core


Ignore:
Timestamp:
12/19/2021 01:42:37 PM (2 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/taxonomy.php

    r52010 r52389  
    1818    public function test_get_unknown_taxonomies() {
    1919        // Taxonomies for an unknown object type.
    20         $this->assertSame( array(), get_object_taxonomies( rand_str() ) );
     20        $this->assertSame( array(), get_object_taxonomies( 'unknown' ) );
    2121        $this->assertSame( array(), get_object_taxonomies( '' ) );
    2222        $this->assertSame( array(), get_object_taxonomies( 0 ) );
     
    145145
    146146        // Make up a new taxonomy name, and ensure it's unused.
    147         $tax = rand_str();
     147        $tax = 'tax_new';
    148148        $this->assertFalse( taxonomy_exists( $tax ) );
    149149
     
    159159
    160160        // Make up a new taxonomy name, and ensure it's unused.
    161         $tax = rand_str();
     161        $tax = 'tax_new';
    162162        $this->assertFalse( taxonomy_exists( $tax ) );
    163163
Note: See TracChangeset for help on using the changeset viewer.