Skip to:
Content

BuddyPress.org

Changeset 8396


Ignore:
Timestamp:
05/07/2014 01:32:35 PM (12 years ago)
Author:
boonebgorges
Message:

Tests: Clean up $wp_version before deciding whether to use 3.9+ go_to()

version_compare() was getting hung up on some WP version numbering schemas,
such as the addition of '-src' when running from a develop.svn.wordpress.org
checkout (like in the case of travis-ci).

File:
1 edited

Legend:

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

    r8394 r8396  
    113113            $path = stripslashes( $_SERVER['REQUEST_URI'] );
    114114
    115             if ( version_compare( $GLOBALS['wp_version'], '3.9', '>=' ) ) {
     115            // Get a cleaned-up version of the wp_version string
     116            // (strip -src, -alpha, etc which may trip up version_compare())
     117            $wp_version = (float) $GLOBALS['wp_version'];
     118            if ( version_compare( $wp_version, '3.9', '>=' ) ) {
    116119
    117120                if ( is_admin() ) {
Note: See TracChangeset for help on using the changeset viewer.