mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 17:44:25 +00:00
Remove old WP version checks from PHPUnit test cases now that tests are branched with each version.
git-svn-id: https://develop.svn.wordpress.org/trunk@25264 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -174,14 +174,14 @@ class Tests_Theme extends WP_UnitTestCase {
|
||||
function test_switch_theme() {
|
||||
$themes = get_themes();
|
||||
|
||||
$switch_theme_one_argument = version_compare( $GLOBALS['wp_version'], '3.5-alpha-21103', '>=' );
|
||||
// Switch to each theme in sequence.
|
||||
// Do it twice to make sure we switch to the first theme, even if it's our starting theme.
|
||||
// Do it a third time to ensure switch_theme() works with one argument.
|
||||
|
||||
// switch to each theme in sequence
|
||||
// do it twice to make sure we switch to the first theme, even if it's our starting theme
|
||||
for ( $i = 0; $i < 3; $i++ ) {
|
||||
foreach ($themes as $name=>$theme) {
|
||||
// switch to this theme
|
||||
if ( $i === 2 || $switch_theme_one_argument )
|
||||
if ( $i === 2 )
|
||||
switch_theme( $theme['Template'], $theme['Stylesheet'] );
|
||||
else
|
||||
switch_theme( $theme['Stylesheet'] );
|
||||
|
||||
Reference in New Issue
Block a user