diff --git a/plugins/woocommerce-admin/tests/plugin-version.php b/plugins/woocommerce-admin/tests/plugin-version.php new file mode 100644 index 00000000000..b8bd2e89a33 --- /dev/null +++ b/plugins/woocommerce-admin/tests/plugin-version.php @@ -0,0 +1,34 @@ + 'Version' ) ); + + // Get plugin DB version. + $db_version = defined( 'WC_ADMIN_VERSION_NUMBER' ) ? constant( 'WC_ADMIN_VERSION_NUMBER' ) : false; + + // Compare all versions to the package.json value. + $this->assertEquals( $package->version, $plugin['Version'], 'Plugin header version does not match package.json' ); + $this->assertEquals( $package->version, $db_version, 'DB version constant does not match package.json' ); + } +}