Update package.json. props TobiasBg. fixes #26629.
git-svn-id: https://develop.svn.wordpress.org/trunk@26940 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8cbbc29e8a
commit
146bcccaa2
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "WordPress",
|
"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.",
|
"description": "WordPress is web software you can use to create a beautiful website or blog.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "svn",
|
"type": "svn",
|
||||||
|
|
|
@ -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." );
|
$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
|
// two tests for a lame bug in PHPUnit that broke the $GLOBALS reference
|
||||||
function test_globals() {
|
function test_globals() {
|
||||||
global $test_foo;
|
global $test_foo;
|
||||||
|
|
Loading…
Reference in New Issue