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/theme.php

    r52386 r52389  
    300300
    301301                // Template file that doesn't exist.
    302                 $this->assertSame( '', get_query_template( rand_str() ) );
     302                $this->assertSame( '', get_query_template( 'nonexistant' ) );
    303303
    304304                // Template files that do exist.
     
    334334    public function test_switch_theme_bogus() {
    335335        // Try switching to a theme that doesn't exist.
    336         $template = rand_str();
    337         $style    = rand_str();
     336        $template = 'some_template';
     337        $style    = 'some_style';
    338338        update_option( 'template', $template );
    339339        update_option( 'stylesheet', $style );
Note: See TracChangeset for help on using the changeset viewer.