WordPress.org

Make WordPress Core

Changeset 298 in tests


Ignore:
Timestamp:
05/16/2010 08:06:12 AM (8 years ago)
Author:
westi
Message:

Add support for skipping tests if not high enough php version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testlib/base.php

    r289 r298  
    430430    }
    431431
    432     /**i
     432    /**
    433433     * Skips the current test if there is open plugin ticket with id $ticket_id
    434434     */
     
    438438        }
    439439    }
    440 
     440    /**
     441     * Skips the current test if the PHP version is not high enough
     442     */
     443    function checkAtLeastPHPVersion($ver) {
     444        if ( version_compare(PHP_VERSION, $ver, '<') ) {
     445            $this->markTestSkipped();
     446        }
     447    }
     448   
     449   
    441450    // convenience function: return the # of posts associated with a tag
    442451    function _tag_count($name) {
Note: See TracChangeset for help on using the changeset viewer.