mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
wp_update_term() should return a true integer for 'term_taxonomy_id'.
Props ipm-frommen. Fixes #32876. git-svn-id: https://develop.svn.wordpress.org/trunk@33652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -472,6 +472,22 @@ class Tests_Term_WpUpdateTerm extends WP_UnitTestCase {
|
||||
$this->assertEquals( $term_by_id, $term_by_ttid );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 32876
|
||||
*/
|
||||
public function test_wp_update_term_should_return_int_values_for_term_id_and_term_taxonomy_id() {
|
||||
register_taxonomy( 'wptests_tax', 'post' );
|
||||
$t = $this->factory->term->create( array(
|
||||
'taxonomy' => 'wptests_tax',
|
||||
) );
|
||||
$found = wp_update_term( $t, 'wptests_tax', array(
|
||||
'slug' => 'foo',
|
||||
) );
|
||||
|
||||
$this->assertInternalType( 'int', $found['term_id'] );
|
||||
$this->assertInternalType( 'int', $found['term_taxonomy_id'] );
|
||||
}
|
||||
|
||||
public function test_wp_update_term_should_clean_object_term_cache() {
|
||||
register_taxonomy( 'wptests_tax_for_post', 'post' );
|
||||
register_taxonomy( 'wptests_tax_for_page', 'page' );
|
||||
|
||||
Reference in New Issue
Block a user