Make WordPress Core


Ignore:
Timestamp:
09/30/2015 01:27:09 PM (9 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/wpInsertTerm.php

    r34719 r34720  
    470470    public function test_wp_insert_term_duplicate_slug_different_taxonomy_before_410_schema_change() {
    471471
    472         $_db_version = $this->db_version;
    473         $this->db_version = 30055;
     472        // See #31130.
     473        $old_db_version = 30055;
     474        if ( is_multisite() ) {
     475            $_db_version = $this->db_version;
     476            $this->db_version = $old_db_version;
     477        } else {
     478            update_option( 'db_version', $old_db_version );
     479        }
    474480
    475481        register_taxonomy( 'wptests_tax', 'post' );
     
    498504        $this->assertNotEquals( $new_term->term_id, $term->term_id );
    499505
    500         $this->db_version = $_db_version;
     506        if ( is_multisite() ) {
     507            $this->db_version = $_db_version;
     508        }
     509
    501510        _unregister_taxonomy( 'wptests_tax', 'post' );
    502511    }
Note: See TracChangeset for help on using the changeset viewer.