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.


git-svn-id: https://develop.svn.wordpress.org/trunk@26166 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-11-14 16:50:21 +00:00
parent cc62157248
commit 4bb79a2ce3
1 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,13 @@ class Tests_Basic extends WP_UnitTestCase {
$this->assertTrue($this->val);
}
function test_readme() {
$readme = file_get_contents( ABSPATH . 'readme.html' );
preg_match( '#<br /> Version (.*)#', $readme, $matches );
list( $version ) = explode( '-', $GLOBALS['wp_version'] );
$this->assertEquals( $version, $matches[1], "readme.html's version needs to be updated to $version." );
}
// two tests for a lame bug in PHPUnit that broke the $GLOBALS reference
function test_globals() {
global $test_foo;