Make WordPress Core


Ignore:
Timestamp:
02/26/2016 02:08:47 AM (11 years ago)
Author:
johnbillion
Message:

Remove (or at least reduce) the need to reset common $_SERVER variables before assertions or between tests, by introducing a method which automatically resets them during test setup.

See #35954

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r35849 r36721  
    102102                        $this->reset_taxonomies();
    103103                        $this->reset_post_statuses();
     104                        $this->reset__SERVER();
    104105
    105106                        if ( $wp_rewrite->permalink_structure ) {
     
    184185                        _unregister_post_status( $post_status );
    185186                }
     187        }
     188
     189        /**
     190         * Reset `$_SERVER` variables
     191         */
     192        protected function reset__SERVER() {
     193                tests_reset__SERVER();
    186194        }
    187195
Note: See TracChangeset for help on using the changeset viewer.