mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Fix db_version juggling during non-multisite tests.
Continuing with the "code is poetry" theme after [34719], we need to continue to update the option in the database on non-multisite in this `wp_insert_term()` test. See #31130. git-svn-id: https://develop.svn.wordpress.org/trunk@34720 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -14,6 +14,8 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
|
||||
protected static $hooks_saved = array();
|
||||
protected static $ignore_files;
|
||||
|
||||
protected $db_version;
|
||||
|
||||
/**
|
||||
* @var WP_UnitTest_Factory
|
||||
*/
|
||||
@@ -64,8 +66,8 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
|
||||
*
|
||||
* See #31130.
|
||||
*/
|
||||
$this->db_version = get_option( 'db_version' );
|
||||
if ( is_multisite() ) {
|
||||
$this->db_version = get_option( 'db_version' );
|
||||
add_filter( 'pre_option_db_version', array( $this, 'db_version' ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user