Make WordPress Core


Ignore:
Timestamp:
11/14/2013 04:50:21 PM (13 years ago)
Author:
nacin
Message:

Add a unit test to confirm that the version number in readme.html matches version.php.

3.7.1 shipped with 3.7 in the readme. Not a big deal, but this should prevent it in the future.

File:
1 edited

Legend:

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

    r25242 r26166  
    2121        function test_true() {
    2222                $this->assertTrue($this->val);
     23        }
     24
     25        function test_readme() {
     26                $readme = file_get_contents( ABSPATH . 'readme.html' );
     27                preg_match( '#<br /> Version (.*)#', $readme, $matches );
     28                list( $version ) = explode( '-', $GLOBALS['wp_version'] );
     29                $this->assertEquals( $version, $matches[1], "readme.html's version needs to be updated to $version." );
    2330        }
    2431
Note: See TracChangeset for help on using the changeset viewer.