Make WordPress Core


Ignore:
Timestamp:
09/05/2013 09:56:10 PM (13 years ago)
Author:
nacin
Message:

Remove old WP version checks from PHPUnit test cases now that tests are branched with each version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme.php

    r25002 r25264  
    175175                $themes = get_themes();
    176176
    177                 $switch_theme_one_argument = version_compare( $GLOBALS['wp_version'], '3.5-alpha-21103', '>=' );
    178 
    179                 // switch to each theme in sequence
    180                 // do it twice to make sure we switch to the first theme, even if it's our starting theme
     177                // Switch to each theme in sequence.
     178                // Do it twice to make sure we switch to the first theme, even if it's our starting theme.
     179                // Do it a third time to ensure switch_theme() works with one argument.
     180
    181181                for ( $i = 0; $i < 3; $i++ ) {
    182182                        foreach ($themes as $name=>$theme) {
    183183                                // switch to this theme
    184                                 if ( $i === 2 || $switch_theme_one_argument )
     184                                if ( $i === 2 )
    185185                                        switch_theme( $theme['Template'], $theme['Stylesheet'] );
    186186                                else
Note: See TracChangeset for help on using the changeset viewer.