WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/09/2016 01:11:14 AM (5 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Begin eliminating unnecessary randomness in tests.

Although unlikely, clashes in randomly generated strings could cause unexpected failures. In addition, most randomness is entirely unnecessary, is bad practice, and increases test time (however small it may be).

See #37371

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/oembed/WpEmbed.php

    r37892 r38762  
    6565
    6666    public function test_wp_embed_register_handler() {
    67         $handle   = rand_str();
     67        $handle   = __FUNCTION__;
    6868        $regex    = '#https?://example\.com/embed/([^/]+)#i';
    6969        $callback = array( $this, '_embed_handler_callback' );
     
    103103
    104104    public function test_autoembed_should_return_modified_content() {
    105         $handle   = rand_str();
     105        $handle   = __FUNCTION__;
    106106        $regex    = '#https?://example\.com/embed/([^/]+)#i';
    107107        $callback = array( $this, '_embed_handler_callback' );
Note: See TracChangeset for help on using the changeset viewer.