Make WordPress Core


Ignore:
Timestamp:
10/17/2015 07:24:20 PM (9 years ago)
Author:
wonderboymusic
Message:

Unit Tests: WP_UnitTest_Generator_Sequence needs a static incrementer - otherwise, it assumes every test class is a reset, which it no longer is (it is now static).

While we're at it, remove unnecessary tearDown() code.

See #30017, #33968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/setupPostdata.php

    r35242 r35244  
    2222            }
    2323        }
    24     }
    25 
    26     public function tearDown() {
    27         parent::tearDown();
    28         return;
    29 
    30         foreach ( $this->global_keys as $global_key ) {
    31             if ( ! is_null( $this->global_data[ $global_key ] ) ) {
    32                 $GLOBALS[ $global_key ] = $this->global_data[ $global_key ];
    33             } else {
    34                 unset( $GLOBALS[ $global_key ] );
    35             }
    36         }
    37 
    38         $this->global_data = array();
    3924    }
    4025
Note: See TracChangeset for help on using the changeset viewer.