diff --git a/tests/phpunit/tests/term/wpUpdateTerm.php b/tests/phpunit/tests/term/wpUpdateTerm.php index f9a2ad8a78..9213de50c2 100644 --- a/tests/phpunit/tests/term/wpUpdateTerm.php +++ b/tests/phpunit/tests/term/wpUpdateTerm.php @@ -300,50 +300,6 @@ class Tests_Term_WpUpdateTerm extends WP_UnitTestCase { $this->assertNotEquals( $t1_terms[0]->term_id, $t2_terms[0]->term_id ); } - /** - * @ticket 5809 - */ - public function test_wp_update_term_should_not_split_shared_term_before_410_schema_change() { - global $wpdb; - - $db_version = get_option( 'db_version' ); - update_option( 'db_version', 30055 ); - - register_taxonomy( 'wptests_tax', 'post' ); - register_taxonomy( 'wptests_tax_2', 'post' ); - - $t1 = wp_insert_term( 'Foo', 'wptests_tax' ); - $t2 = wp_insert_term( 'Foo', 'wptests_tax_2' ); - - // Manually modify because shared terms shouldn't naturally occur. - $wpdb->update( $wpdb->term_taxonomy, - array( 'term_id' => $t1['term_id'] ), - array( 'term_taxonomy_id' => $t2['term_taxonomy_id'] ), - array( '%d' ), - array( '%d' ) - ); - - $posts = $this->factory->post->create_many( 2 ); - wp_set_object_terms( $posts[0], array( 'Foo' ), 'wptests_tax' ); - wp_set_object_terms( $posts[1], array( 'Foo' ), 'wptests_tax_2' ); - - // Verify that the term is shared. - $t1_terms = wp_get_object_terms( $posts[0], 'wptests_tax' ); - $t2_terms = wp_get_object_terms( $posts[1], 'wptests_tax_2' ); - $this->assertSame( $t1_terms[0]->term_id, $t2_terms[0]->term_id ); - - wp_update_term( $t2_terms[0]->term_id, 'wptests_tax_2', array( - 'name' => 'New Foo', - ) ); - - // Term should still be shared. - $t1_terms = wp_get_object_terms( $posts[0], 'wptests_tax' ); - $t2_terms = wp_get_object_terms( $posts[1], 'wptests_tax_2' ); - $this->assertSame( $t1_terms[0]->term_id, $t2_terms[0]->term_id ); - - update_option( 'db_version', $db_version ); - } - public function test_wp_update_term_alias_of_no_term_group() { register_taxonomy( 'wptests_tax', 'post' ); $t1 = $this->factory->term->create( array(