diff --git a/tests/phpunit/tests/basic.php b/tests/phpunit/tests/basic.php index 056af06acc..4110d59b80 100644 --- a/tests/phpunit/tests/basic.php +++ b/tests/phpunit/tests/basic.php @@ -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( '#
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;