diff --git a/package.json b/package.json index e836edf839..fcb2ad98c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "WordPress", - "version": "3.7.0", + "version": "3.9.0", "description": "WordPress is web software you can use to create a beautiful website or blog.", "repository": { "type": "svn", diff --git a/tests/phpunit/tests/basic.php b/tests/phpunit/tests/basic.php index d5aba28b9d..e66f75d0a9 100644 --- a/tests/phpunit/tests/basic.php +++ b/tests/phpunit/tests/basic.php @@ -29,6 +29,17 @@ class Tests_Basic extends WP_UnitTestCase { $this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." ); } + function test_package_json() { + $package_json = file_get_contents( dirname( ABSPATH ) . '/package.json' ); + $package_json = json_decode( $package_json, true ); + list( $version ) = explode( '-', $GLOBALS['wp_version'] ); + // package.json uses x.y.z, so fill cleaned $wp_version for .0 releases + if ( 1 == substr_count( $version, '.' ) ) { + $version .= '.0'; + } + $this->assertEquals( $version, $package_json['version'], "package.json'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;